Skip to content

Commit

Permalink
Merge pull request #4 from YouSee/improvements
Browse files Browse the repository at this point in the history
Snapshot image comparing and minor fixes
  • Loading branch information
renegus authored Aug 29, 2019
2 parents b4f0b9a + 67d28a5 commit 4520d66
Show file tree
Hide file tree
Showing 20 changed files with 850 additions and 66 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ jobs:
command: npm run build
- run:
name: test
command: npm run test
command: npm run test:circleCI
environment:
PXSCENE_PATH: "xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x16' /usr/src/app/pxCore/examples/pxScene2d/src/spark.sh"
- store_artifacts:
path: ~/spark/results
workflows:
version: 2
test:
Expand Down
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ module.exports = {
'fp/no-class': 'error',
},
settings: {
'import/core-modules': ['get-stdin', 'chalk'],
'import/resolver': {
node: {
extensions: ['.ts', '.js'],
},
},
'import/extensions': ['.ts', '.js'],
},
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ npm-debug.log*
/local
/reports
/node_modules
/results

.DS_Store
Thumbs.db
Expand Down
10 changes: 10 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
module.exports = {
setupFilesAfterEnv: ['./jest.setup.js'],
reporters: [
'default',
[
'jest-html-reporters',
{
publicPath: './results',
filename: 'report.html',
},
],
],
}
12 changes: 11 additions & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
jest.setTimeout(30000)
import { configureToMatchImageSnapshot } from './dist'

jest.setTimeout(30000)

const toMatchImageSnapshot = configureToMatchImageSnapshot({
customDiffDir: './results',
})

expect.extend({
toMatchImageSnapshot,
})
Loading

0 comments on commit 4520d66

Please sign in to comment.