Skip to content

Commit 0fe4954

Browse files
authored
chore: migrate tests from karma to jest (#68)
* chore: set jest test environment chore: remove karma-jasmine test environment * chore: migrate tests from jasmine to jest * chore: apply code reviews * chore: update readme * chore: change mocking method * chore: improve readability of tests chore: change to a more appropriate matcher * chore: apply code reviews * docs: change the word to match contextual intent
1 parent 882221b commit 0fe4954

21 files changed

+8468
-5819
lines changed

.eslintrc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ module.exports = {
44
'browser': true,
55
'amd': true,
66
'node': true,
7-
'jasmine': true
8-
},
9-
'globals': {
10-
'fixture': true
7+
'jest': true
118
},
129
'ignorePatterns': ['node_modules/', 'dist/', 'docs/', 'report/']
1310
};

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ Desktop.ini
3535
.project
3636
.metadata
3737

38-
#report / screenshots
39-
report
40-
screenshots
41-
4238
# Atom
4339
tags
4440
.ctags

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- [🔧 Pull Request Steps](#-pull-request-steps)
2323
- [Setup](#setup)
2424
- [Develop](#develop)
25-
- [Run karma test](#run-karma-test)
25+
- [Running test](#running-test)
2626
- [Pull Request](#pull-request)
2727
- [💬 Contributing](#-contributing)
2828
- [🍞 TOAST UI Family](#-toast-ui-family)
@@ -187,7 +187,7 @@ $ npm run test
187187
Let's start development!
188188
Don't miss adding test cases and then make green rights.
189189

190-
#### Run karma test
190+
#### Running test
191191

192192
``` sh
193193
$ npm run test

jest.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable strict */
2+
module.exports = {
3+
moduleFileExtensions: ['js'],
4+
testEnvironment: 'jsdom',
5+
testMatch: ['<rootDir>/**/*.spec.js'],
6+
transformIgnorePatterns: ['<rootDir>/node_modules/'],
7+
clearMocks: true,
8+
setupFilesAfterEnv: ['jest-extended']
9+
};

karma.conf.js

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)