Skip to content

Commit

Permalink
chore: migrate tests from karma to jest (#68)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jajugoguma authored Jun 18, 2021
1 parent 882221b commit 0fe4954
Show file tree
Hide file tree
Showing 21 changed files with 8,468 additions and 5,819 deletions.
5 changes: 1 addition & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ module.exports = {
'browser': true,
'amd': true,
'node': true,
'jasmine': true
},
'globals': {
'fixture': true
'jest': true
},
'ignorePatterns': ['node_modules/', 'dist/', 'docs/', 'report/']
};
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ Desktop.ini
.project
.metadata

#report / screenshots
report
screenshots

# Atom
tags
.ctags
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- [🔧 Pull Request Steps](#-pull-request-steps)
- [Setup](#setup)
- [Develop](#develop)
- [Run karma test](#run-karma-test)
- [Running test](#running-test)
- [Pull Request](#pull-request)
- [💬 Contributing](#-contributing)
- [🍞 TOAST UI Family](#-toast-ui-family)
Expand Down Expand Up @@ -187,7 +187,7 @@ $ npm run test
Let's start development!
Don't miss adding test cases and then make green rights.

#### Run karma test
#### Running test

``` sh
$ npm run test
Expand Down
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* eslint-disable strict */
module.exports = {
moduleFileExtensions: ['js'],
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/**/*.spec.js'],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
clearMocks: true,
setupFilesAfterEnv: ['jest-extended']
};
136 changes: 0 additions & 136 deletions karma.conf.js

This file was deleted.

Loading

0 comments on commit 0fe4954

Please sign in to comment.