Explorar o código

jest-browser-globals

Adam Shaw %!s(int64=6) %!d(string=hai) anos
pai
achega
4b5cb6fc8e
Modificáronse 2 ficheiros con 24 adicións e 0 borrados
  1. 23 0
      examples/_jest.html
  2. 1 0
      package.json

+ 23 - 0
examples/_jest.html

@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset='utf-8' />
+    <link href='https://cdn.jsdelivr.net/npm/[email protected]/mocha.css' rel='stylesheet' />
+    <script src='https://cdn.jsdelivr.net/npm/[email protected]/mocha.js'></script>
+    <script>mocha.setup('bdd')</script>
+    <script src='../node_modules/jest-browser-globals/build-es5/index.js'></script>
+    <script>
+
+      describe('cool thing', function() {
+        test('that is works', function() {
+          expect(5).toBe(6);
+        });
+      });
+
+    </script>
+  </head>
+  <body>
+    <div id='mocha'></div>
+    <script>mocha.run()</script>
+  </body>
+</html>

+ 1 - 0
package.json

@@ -75,6 +75,7 @@
     "handlebars": "^4.1.2",
     "jasmine-core": "2.5.2",
     "jasmine-jquery": "^2.1.1",
+    "jest-browser-globals": "^25.1.0-beta",
     "jquery": "^3.4.0",
     "jquery-simulate": "github:jquery/jquery-simulate",
     "karma": "^0.13.22",