Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
Add E2E tests using files in examples directory
Browse files Browse the repository at this point in the history
* Add test file

* Unignore JS test files

* Run tests in CI

* Add test:e2e script

* Add TestCafe plugins for linting

* Add start:e2e script for E2E tests

* Install testcafe + configuration

* Serve examples at localhost using servor
  • Loading branch information
markcellus committed Dec 17, 2021
1 parent effdf25 commit d48954a
Show file tree
Hide file tree
Showing 8 changed files with 6,607 additions and 376 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: 'eslint:recommended',
extends: ['eslint:recommended', 'plugin:testcafe/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'testcafe'],
parserOptions: {
sourceType: 'module',
},
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
.coverage
.rpt2_cache
dist
.env
tests/**/*.js
.env
9 changes: 9 additions & 0 deletions .testcaferc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"browsers": [
"browserstack:[email protected]:Windows 10",
"browserstack:[email protected]:Windows 10"
],
"hostname": "localhost",
"src": "**/*.e2e.js",
"appCommand": "npm run start:e2e"
}
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_js:
script:
- npm test
- npm run build # ensure it builds
- npm run test:e2e
after_success: 'npm run coveralls'
branches:
only:
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,11 @@ Run tests:
npm install
npm test
```

### E2E Tests

The following runs E2E tests on the files in the examples folder.

```
npm run test:e2e
```
Loading

0 comments on commit d48954a

Please sign in to comment.