Skip to content

Commit

Permalink
Merge pull request #463 from czosel/refactor-tests
Browse files Browse the repository at this point in the history
chore: refactor testing infrastructure
  • Loading branch information
ichiriac committed Jan 6, 2020
2 parents 4e9d584 + 62f0ad5 commit 4d8b8b7
Show file tree
Hide file tree
Showing 19 changed files with 1,106 additions and 2,106 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -5,7 +5,7 @@ module.exports = {
sourceType: "module"
},
plugins: ["prettier"],
extends: ["eslint:recommended"],
extends: ["eslint:recommended", "plugin:jest/recommended"],
env: {
browser: true,
node: true,
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -17,7 +17,7 @@ notifications:
on_success: change
on_failure: always
on_start: never
script: npm run lint && npm run cover
script: npm test
after_success: cat /home/travis/build/glayzzle/php-parser/coverage/lcov.info | /home/travis/build/glayzzle/php-parser/node_modules/coveralls/bin/coveralls.js
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
20 changes: 20 additions & 0 deletions jest.config.js
@@ -0,0 +1,20 @@
"use strict";

const ENABLE_COVERAGE = !!process.env.CI || !!process.env.COVERAGE;

module.exports = {
collectCoverage: ENABLE_COVERAGE,
coverageDirectory: "coverage/",
projects: [
{
displayName: "test",
testEnvironment: "node"
},
{
runner: "jest-runner-eslint",
displayName: "lint",
testMatch: ["<rootDir>/**/*.js"],
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/coverage/"]
}
]
};

0 comments on commit 4d8b8b7

Please sign in to comment.