Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP - add JS functional test harness #2

Merged
merged 13 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
env:
es6: true
node: true
mocha: true

parserOptions:
sourceType: module
ecmaVersion: 7
ecmaVersion: 8

extends:
- eslint:recommended
Expand All @@ -17,6 +18,7 @@ plugins:
root: true

rules:
array-bracket-spacing: [error, never]
eqeqeq: error
generator-star-spacing: [warn, {before: true, after: false}]
guard-for-in: warn # There's nothing wrong with for..in if you know what you're doing. This is here just to keep me from accidentally saying "for..in" when I mean "for..of". Delete this and come up with a better solution if we ever need to use "for..in".
Expand All @@ -36,6 +38,7 @@ rules:
no-useless-escape: error
no-var: warn
no-warning-comments: [warn, {terms: [xxx, fixme, hack], location: start}]
object-curly-spacing: [error, never]
object-shorthand: [error, properties]
prefer-const: off
quotes: [error, single, {avoidEscape: true, allowTemplateLiterals: true}]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
**/*.js
!/rollup.config.js
!/trainees.js
!/test/browser/*
/cli/build
/cli/dist
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ jobs:
language: node_js
node_js:
- node
env:
- MOZ_HEADLESS=1
addons:
apt:
packages:
- python-virtualenv
firefox: latest
script:
- npm test
after_success:
- "npm run coveralls"
- stage: test
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ all: $(JS)

lint:
@node_modules/.bin/eslint --ext mjs .
@node_modules/.bin/eslint test/browser

test: $(JS)
@node_modules/.bin/mocha
@node_modules/.bin/mocha --recursive
pytest cli/fathom_web/test

coverage: $(JS)
@node_modules/.bin/istanbul cover node_modules/.bin/_mocha
@node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --recursive

debugtest: $(JS)
# This is known to work on node 7.6.0.
Expand Down
Loading