Skip to content

Commit

Permalink
chore: migrate from mocha to jest (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamaltman authored Sep 12, 2024
1 parent 212f0af commit 1b6adcb
Show file tree
Hide file tree
Showing 22 changed files with 6,804 additions and 5,914 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"strict": 0,
"quotes": [2, "single"]
},
"ignorePatterns": ["dist/", "node_modules/"],
"env": {
"browser": true,
"node": true
Expand Down
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ env:
- secure: WxIg72wkIfv7pSwWqhBLRl18yxBW9tF441utXTdZ94vbDeQC/NokuxTGWOCEs2VVnbwDrnE1iQuwJJBYjqK8+mywSzcP5dnsxMVLLTkmV4aFOJUWDZrKxeWJ82NqwT8ZRCzXWdO8VPVxHE+ytf8O/CMgTfG3QmvoSTwuVno37Mv1I2eInnrqh9VPbsCgbzDto5q7BNee6XSsmITOMgsEcdnI8JeVpWRXiPWFb9U4nBm+em6rIZpdydCMH95RkWi3VsdcePxJ5pI44ksNgauR3ic6KLTxIL9GOW0KuPSk6+/BHz1xuq7Cetsl/UyZdHwDbp1XnAcOS8msYiL9HdVHbuGOLZx81V3Q3cy6fsrLOrDrCFkT+iJqUURfhaqsqc6lO9fbhcfLpCrfua6QaKJiGb5VQQHTXj8rXbHWQ7aQjW8VxGwAXfNrpDDqzSn3pESQjU5udkui3Z0QkSU8Cuvivc+6ttuqGgI2sXoXskwW03aHfAz9C3SIPZnTLEPTEKYyHzFDIDjeuZ622u2SWK+OF7nmCyRN5JGls/n6gqNYwfixMQTXXQujQXbZuZ2O9ytMMG1Aw8i+CuAvzPHU5JeO0PCWZjII4z9TsnVrBGJTmvziRtRU3bIOQeX9IDlg9UQmyfQJGAw45PhIr7hzSBKgM9qid5vYsz1mwRqRu34G4+4=
before_script:
- export DISPLAY=:99.0
script: gulp test
script:
- npm run test
- npm run coverage

after_success:
- cat coverage/*/lcov.info > coveralls.txt
- cat coveralls.txt | node_modules/coveralls/bin/coveralls.js
- npm run coveralls

cache:
directories:
- node_modules
2 changes: 1 addition & 1 deletion gulp-tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ function build() {
.pipe(gulp.dest(config.destinationFolder));
}

gulp.task('build', gulp.series(gulp.parallel('lint', 'clean'), build));
gulp.task('build', gulp.series(gulp.parallel('clean'), build));
20 changes: 0 additions & 20 deletions gulp-tasks/coverage.js

This file was deleted.

6 changes: 1 addition & 5 deletions gulp-tasks/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import './lint';
import './test';
import './coverage';
import './watch';
import './clean';
import './build';
import './config'
import './config';
41 changes: 0 additions & 41 deletions gulp-tasks/lint.js

This file was deleted.

28 changes: 0 additions & 28 deletions gulp-tasks/test.js

This file was deleted.

10 changes: 0 additions & 10 deletions gulp-tasks/watch.js

This file was deleted.

2 changes: 1 addition & 1 deletion gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ import './gulp-tasks';
// Load all of our Gulp plugins
global.$ = gulpLoadPlugins();

gulp.task('default', gulp.series('test'));
gulp.task('default', gulp.series('build'));
15 changes: 15 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
testEnvironment: 'node',
transform: {
'^.+\\.js$': 'babel-jest',
},
moduleFileExtensions: ['js', 'json'],
testMatch: ['**/test/**/*.spec.js'],
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.js',
'!**/node_modules/**',
'!**/vendor/**'
],
coverageReporters: ['text', 'lcov', 'clover']
};
52 changes: 0 additions & 52 deletions karma.conf.js

This file was deleted.

Loading

0 comments on commit 1b6adcb

Please sign in to comment.