diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e60d9f..cd9f50a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: dependency_cache: docker: - - image: circleci/node:14-browsers + - image: circleci/node:16-browsers steps: - checkout - restore_cache: @@ -16,7 +16,7 @@ jobs: - ./node_modules node-v14-latest: docker: - - image: circleci/node:14-browsers + - image: circleci/node:16-browsers steps: - checkout - restore_cache: @@ -33,7 +33,7 @@ jobs: when: on_success analysis: docker: - - image: circleci/node:14-browsers + - image: circleci/node:16-browsers steps: - checkout - restore_cache: diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index cebf84b..0000000 --- a/.eslintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "shellscape" -} diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..7d54b5a --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,17 @@ +module.exports = { + env: { + browser: true, + es2021: true, + node: true, + mocha: true + }, + extends: [ + 'standard' + ], + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module' + }, + rules: { + } +} diff --git a/.nvmrc b/.nvmrc index 48082f7..b6a7d89 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -12 +16 diff --git a/README.md b/README.md index f6b579d..79e4411 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -[tests]: https://img.shields.io/circleci/project/github/shellscape/mocha-chrome.svg +[tests]: https://img.shields.io/circleci/project/github/shellscape/mocha-chrome.svg [tests-url]: https://circleci.com/gh/shellscape/mocha-chrome - [size]: https://packagephobia.now.sh/badge?p=mocha-chrome [size-url]: https://packagephobia.now.sh/result?p=mocha-chrome @@ -14,7 +13,7 @@ ## Requirements -`mocha-chrome` requires Node v8.0.0 or higher. +`mocha-chrome` requires Node v16.0.0 or higher. `mocha-chrome` is a development tool, which means you can use tools like [NVM](https://github.com/creationix/nvm) and [nodenv](https://github.com/nodenv/nodenv) to manage your installed versions, and temporarily switch to v8+ to run tests on your machine. Most modern CI environments also support specifying the version of Node to run. @@ -35,11 +34,11 @@ $ npm install mocha --save-dev To run the tests, you'll need an HTML file with some basics: ```html - + Test - + @@ -47,6 +46,7 @@ To run the tests, you'll need an HTML file with some basics:
- ``` You can then add your tests either through an external script file or inline within a `
+
+
+
+
+ - - - -
- + + + +
+ + - + setTimeout(function () { + mocha.run(); + }, 1500); + + diff --git a/test/html/no-run.html b/test/html/no-run.html index 46c236c..515ce74 100644 --- a/test/html/no-run.html +++ b/test/html/no-run.html @@ -1,18 +1,22 @@ Test - +
+
+ @@ -11,14 +11,16 @@
+ diff --git a/test/html/runner-mod.html b/test/html/runner-mod.html index f252d8d..d691b10 100644 --- a/test/html/runner-mod.html +++ b/test/html/runner-mod.html @@ -1,33 +1,37 @@ Test - +
+ diff --git a/test/html/test.html b/test/html/test.html index a3fa5d2..9aeb501 100644 --- a/test/html/test.html +++ b/test/html/test.html @@ -1,19 +1,23 @@ - + Test - +
+