Skip to content

Commit

Permalink
chore: migrate tests from karma to jest (#32)
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: remove unnecessary file

* docs: change the word to match contextual intent

* chore: apply code reviews
  • Loading branch information
jajugoguma authored Jun 21, 2021
1 parent 7fe2020 commit 3e982b0
Show file tree
Hide file tree
Showing 12 changed files with 6,349 additions and 6,274 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = {
},
env: {
browser: true,
jasmine: true,
jest: true,
jquery: true,
commonjs: true
},
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Desktop.ini
.project
.metadata

#report / screenshots
report
screenshots

# Atom
tags
.ctags
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
- [🔧 Pull Request Steps](#-pull-request-steps)
- [Setup](#setup)
- [Develop](#develop)
- [Run webpack-dev-server](#run-webpack-dev-server)
- [Run karma test](#run-karma-test)
- [Running dev server](#running-dev-server)
- [Running test](#running-test)
- [Pull Request](#pull-request)
- [💬 Contributing](#-contributing)
- [🍞 TOAST UI Family](#-toast-ui-family)
Expand Down Expand Up @@ -207,14 +207,14 @@ Let's start development!
You can see your code is reflected as soon as you saving the codes by running a server.
Don't miss adding test cases and then make green rights.

#### Run webpack-dev-server
#### Running dev server

``` sh
$ npm run serve
$ npm run serve:ie8 # Run on Internet Explorer 8
```

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

``` sh
$ npm run test
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"examples",
"src",
"test",
"karma.conf.js",
"jest.config.js",
"package-lock.json",
"package.json",
"tui-note.config.js",
Expand Down
12 changes: 12 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable strict */
module.exports = {
moduleFileExtensions: ['js'],
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/**/*.spec.js'],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
clearMocks: true,
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/js/$1'
},
setupFilesAfterEnv: ['./test/setup-globals.js']
};
169 changes: 0 additions & 169 deletions karma.conf.js

This file was deleted.

Loading

0 comments on commit 3e982b0

Please sign in to comment.