mirror of https://github.com/docker/docs.git
Merge pull request #546 from kitematic/fix-jest
Adding integration tests
This commit is contained in:
commit
30ec88d918
|
@ -6,6 +6,3 @@ cache:
|
||||||
directories:
|
directories:
|
||||||
- resources
|
- resources
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|
||||||
after_success:
|
|
||||||
- which ./node_modules/coveralls/bin/coveralls.js && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
|
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
jest.autoMockOff();
|
||||||
|
|
||||||
|
describe('HubUtil Integration Tests', () => {
|
||||||
|
describe('token refresh', () => {
|
||||||
|
it('re-auths if the token has expired', () => {
|
||||||
|
expect(true).toBe(true);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('signup', () => {
|
||||||
|
it('returns a 204 and sets localstorage data', () => {
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('login', () => {
|
||||||
|
it('Returns a 401 with account not active string if not active', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
it('Returns a 401 if the password is wrong', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -0,0 +1,9 @@
|
||||||
|
jest.autoMockOff();
|
||||||
|
|
||||||
|
describe('RegHubUtil Integration Tests', () => {
|
||||||
|
describe('repos', () => {
|
||||||
|
it('returns set of repos', () => {
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
|
@ -1,9 +1,9 @@
|
||||||
jest.dontMock('./SetupStore');
|
jest.dontMock('../src/stores/SetupStore');
|
||||||
var setupStore = require('./SetupStore');
|
var setupStore = require('../src/stores/SetupStore');
|
||||||
var virtualBox = require('../utils/VirtualBoxUtil');
|
var virtualBox = require('../src/utils/VirtualBoxUtil');
|
||||||
var util = require('../utils/Util');
|
var util = require('../src/utils/Util');
|
||||||
var machine = require('../utils/DockerMachineUtil');
|
var machine = require('../src/utils/DockerMachineUtil');
|
||||||
var setupUtil = require('../utils/SetupUtil');
|
var setupUtil = require('../src/utils/SetupUtil');
|
||||||
|
|
||||||
describe('SetupStore', function () {
|
describe('SetupStore', function () {
|
||||||
describe('download step', function () {
|
describe('download step', function () {
|
|
@ -1,7 +1,7 @@
|
||||||
jest.dontMock('./URLUtil');
|
jest.dontMock('../src/utils/URLUtil');
|
||||||
jest.dontMock('parseUri');
|
jest.dontMock('parseUri');
|
||||||
var urlUtil = require('./URLUtil');
|
var urlUtil = require('../src/utils/URLUtil');
|
||||||
var util = require('./Util');
|
var util = require('../src/utils/Util');
|
||||||
|
|
||||||
describe('URLUtil', function () {
|
describe('URLUtil', function () {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
|
@ -1,5 +1,5 @@
|
||||||
jest.dontMock('./Util');
|
jest.dontMock('../src/utils/Util');
|
||||||
var util = require('./Util');
|
var util = require('../src/utils/Util');
|
||||||
|
|
||||||
describe('Util', function () {
|
describe('Util', function () {
|
||||||
describe('when removing sensitive data', function () {
|
describe('when removing sensitive data', function () {
|
|
@ -1,6 +1,6 @@
|
||||||
jest.dontMock('./VirtualBoxUtil');
|
jest.dontMock('../src/utils/VirtualBoxUtil');
|
||||||
var virtualBox = require('./VirtualBoxUtil');
|
var virtualBox = require('../src/utils/VirtualBoxUtil');
|
||||||
var util = require('./Util');
|
var util = require('../src/utils/Util');
|
||||||
|
|
||||||
describe('VirtualBox', function () {
|
describe('VirtualBox', function () {
|
||||||
it('returns the right command', function () {
|
it('returns the right command', function () {
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"testDirectoryName": "__integration__",
|
||||||
|
"scriptPreprocessor": "<rootDir>/util/preprocessor.js",
|
||||||
|
"setupEnvScriptFile": "<rootDir>/util/testenv.js",
|
||||||
|
"setupTestFrameworkScriptFile": "<rootDir>/util/prepare.js",
|
||||||
|
"unmockedModulePathPatterns": [
|
||||||
|
"babel",
|
||||||
|
"<rootDir>/node_modules/source-map-support"
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"scriptPreprocessor": "<rootDir>/util/preprocessor.js",
|
||||||
|
"setupEnvScriptFile": "<rootDir>/util/testenv.js",
|
||||||
|
"setupTestFrameworkScriptFile": "<rootDir>/util/prepare.js",
|
||||||
|
"unmockedModulePathPatterns": [
|
||||||
|
"alt",
|
||||||
|
"stream",
|
||||||
|
"tty",
|
||||||
|
"net",
|
||||||
|
"crypto",
|
||||||
|
"babel",
|
||||||
|
"<rootDir>/node_modules/.*JSONStream",
|
||||||
|
"<rootDir>/node_modules/object-assign",
|
||||||
|
"<rootDir>/node_modules/underscore",
|
||||||
|
"<rootDir>/node_modules/bluebird",
|
||||||
|
"<rootDir>/node_modules/source-map-support"
|
||||||
|
]
|
||||||
|
}
|
31
package.json
31
package.json
|
@ -12,7 +12,8 @@
|
||||||
"bugs": "https://github.com/kitematic/kitematic/issues",
|
"bugs": "https://github.com/kitematic/kitematic/issues",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "gulp",
|
"start": "gulp",
|
||||||
"test": "jest",
|
"test": "jest -c jest-unit.json",
|
||||||
|
"integration": "jest -c jest-integration.json",
|
||||||
"release": "gulp release",
|
"release": "gulp release",
|
||||||
"release:beta": "gulp release --beta",
|
"release:beta": "gulp release --beta",
|
||||||
"lint": "jsxhint src",
|
"lint": "jsxhint src",
|
||||||
|
@ -24,30 +25,6 @@
|
||||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"jest": {
|
|
||||||
"scriptPreprocessor": "<rootDir>/util/preprocessor.js",
|
|
||||||
"setupEnvScriptFile": "<rootDir>/util/testenv.js",
|
|
||||||
"setupTestFrameworkScriptFile": "<rootDir>/util/prepare.js",
|
|
||||||
"collectCoverage": true,
|
|
||||||
"testDirectoryName": "src",
|
|
||||||
"testPathIgnorePatterns": [
|
|
||||||
"/node_modules/",
|
|
||||||
"^((?!-test).)*$"
|
|
||||||
],
|
|
||||||
"unmockedModulePathPatterns": [
|
|
||||||
"alt",
|
|
||||||
"stream",
|
|
||||||
"tty",
|
|
||||||
"net",
|
|
||||||
"crypto",
|
|
||||||
"babel",
|
|
||||||
"<rootDir>/node_modules/.*JSONStream",
|
|
||||||
"<rootDir>/node_modules/object-assign",
|
|
||||||
"<rootDir>/node_modules/underscore",
|
|
||||||
"<rootDir>/node_modules/bluebird",
|
|
||||||
"<rootDir>/node_modules/source-map-support"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"docker-version": "1.6.2",
|
"docker-version": "1.6.2",
|
||||||
"docker-machine-version": "0.2.0",
|
"docker-machine-version": "0.2.0",
|
||||||
"electron-version": "0.26.0",
|
"electron-version": "0.26.0",
|
||||||
|
@ -66,8 +43,8 @@
|
||||||
"classnames": "^1.2.0",
|
"classnames": "^1.2.0",
|
||||||
"coveralls": "^2.11.2",
|
"coveralls": "^2.11.2",
|
||||||
"deep-extend": "^0.4.0",
|
"deep-extend": "^0.4.0",
|
||||||
"dockerode": "^2.1.4",
|
|
||||||
"exec": "0.2.0",
|
"exec": "0.2.0",
|
||||||
|
"dockerode": "^2.1.4",
|
||||||
"install": "^0.1.8",
|
"install": "^0.1.8",
|
||||||
"jquery": "^2.1.3",
|
"jquery": "^2.1.3",
|
||||||
"mixpanel": "0.2.0",
|
"mixpanel": "0.2.0",
|
||||||
|
@ -102,7 +79,7 @@
|
||||||
"gulp-shell": "^0.4.1",
|
"gulp-shell": "^0.4.1",
|
||||||
"gulp-sourcemaps": "^1.5.2",
|
"gulp-sourcemaps": "^1.5.2",
|
||||||
"gulp-util": "^3.0.4",
|
"gulp-util": "^3.0.4",
|
||||||
"jest-cli": "kitematic/jest",
|
"jest-cli": "^0.4.5",
|
||||||
"jsxhint": "^0.14.0",
|
"jsxhint": "^0.14.0",
|
||||||
"minimist": "^1.1.1",
|
"minimist": "^1.1.1",
|
||||||
"react-tools": "^0.13.1",
|
"react-tools": "^0.13.1",
|
||||||
|
|
Loading…
Reference in New Issue