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

#122: Add JavaScript functional test harness #129

Merged
merged 14 commits into from
Aug 20, 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
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ all: $(JS)

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

# Does not include mocha browser tests. Use 'npm test' (Linux-based shells only) to run all mocha tests.
test: $(JS)
@node_modules/.bin/mocha
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