1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-08 23:25:51 +01:00

Webui: bootstrap and test setup

This commit is contained in:
Ayush Sharma 2017-11-28 21:35:58 +05:30 committed by juanpicado
parent 246a680ee1
commit de867e7a65
4 changed files with 25 additions and 1 deletions

@ -8,6 +8,15 @@ module.exports = {
'node_modules',
'fixtures'
],
'testRegex': '(/test/unit.*\\.spec|test/functional.*\\.func)\\.js'
'testRegex': '(/test/unit.*\\.spec|test/functional.*\\.func|/test/webui/.*\\.spec)\\.js',
// 'testRegex': '(test/functional.*\\.func)\\.js'
'setupFiles': [
'./test/webui/global.js'
],
'modulePathIgnorePatterns': [
'global.js'
],
'moduleNameMapper': {
'\\.(scss)$': '<rootDir>/node_modules/jest-css-modules'
}
};

@ -97,6 +97,7 @@
"html-webpack-plugin": "2.30.1",
"in-publish": "2.0.0",
"jest": "^21.2.1",
"jest-css-modules": "^1.1.0",
"jest-serializer-enzyme": "^1.0.0",
"localstorage-memory": "1.0.2",
"node-sass": "4.7.2",

@ -0,0 +1,5 @@
describe('test', () => {
it('add', () => {
expect(2).toEqual(3);
})
})

9
test/webui/global.js Normal file

@ -0,0 +1,9 @@
/**
* Setup configuration for Jest
* This file includes gloabl settings for the JEST environment.
*/
import 'raf/polyfill';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
configure({ adapter: new Adapter() });