Adam Shaw 6 лет назад
Родитель
Сommit
4b5cb6fc8e
2 измененных файлов с 24 добавлено и 0 удалено
  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",
     "handlebars": "^4.1.2",
     "jasmine-core": "2.5.2",
     "jasmine-core": "2.5.2",
     "jasmine-jquery": "^2.1.1",
     "jasmine-jquery": "^2.1.1",
+    "jest-browser-globals": "^25.1.0-beta",
     "jquery": "^3.4.0",
     "jquery": "^3.4.0",
     "jquery-simulate": "github:jquery/jquery-simulate",
     "jquery-simulate": "github:jquery/jquery-simulate",
     "karma": "^0.13.22",
     "karma": "^0.13.22",