mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
Fixing jest tests, adding integration tests
This commit is contained in:
23
__integration__/HubUtil-integration.js
Normal file
23
__integration__/HubUtil-integration.js
Normal file
@@ -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', () => {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
9
__integration__/RegHubUtil-integration.js
Normal file
9
__integration__/RegHubUtil-integration.js
Normal file
@@ -0,0 +1,9 @@
|
||||
jest.autoMockOff();
|
||||
|
||||
describe('RegHubUtil Integration Tests', () => {
|
||||
describe('repos', () => {
|
||||
it('returns set of repos', () => {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,9 +1,9 @@
|
||||
jest.dontMock('./SetupStore');
|
||||
var setupStore = require('./SetupStore');
|
||||
var virtualBox = require('../utils/VirtualBoxUtil');
|
||||
var util = require('../utils/Util');
|
||||
var machine = require('../utils/DockerMachineUtil');
|
||||
var setupUtil = require('../utils/SetupUtil');
|
||||
jest.dontMock('../src/stores/SetupStore');
|
||||
var setupStore = require('../src/stores/SetupStore');
|
||||
var virtualBox = require('../src/utils/VirtualBoxUtil');
|
||||
var util = require('../src/utils/Util');
|
||||
var machine = require('../src/utils/DockerMachineUtil');
|
||||
var setupUtil = require('../src/utils/SetupUtil');
|
||||
|
||||
describe('SetupStore', function () {
|
||||
describe('download step', function () {
|
||||
@@ -1,7 +1,7 @@
|
||||
jest.dontMock('./URLUtil');
|
||||
jest.dontMock('../src/utils/URLUtil');
|
||||
jest.dontMock('parseUri');
|
||||
var urlUtil = require('./URLUtil');
|
||||
var util = require('./Util');
|
||||
var urlUtil = require('../src/utils/URLUtil');
|
||||
var util = require('../src/utils/Util');
|
||||
|
||||
describe('URLUtil', function () {
|
||||
beforeEach(() => {
|
||||
@@ -1,5 +1,5 @@
|
||||
jest.dontMock('./Util');
|
||||
var util = require('./Util');
|
||||
jest.dontMock('../src/utils/Util');
|
||||
var util = require('../src/utils/Util');
|
||||
|
||||
describe('Util', function () {
|
||||
describe('when removing sensitive data', function () {
|
||||
@@ -1,6 +1,6 @@
|
||||
jest.dontMock('./VirtualBoxUtil');
|
||||
var virtualBox = require('./VirtualBoxUtil');
|
||||
var util = require('./Util');
|
||||
jest.dontMock('../src/utils/VirtualBoxUtil');
|
||||
var virtualBox = require('../src/utils/VirtualBoxUtil');
|
||||
var util = require('../src/utils/Util');
|
||||
|
||||
describe('VirtualBox', function () {
|
||||
it('returns the right command', function () {
|
||||
19
jest-integration.json
Normal file
19
jest-integration.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"testDirectoryName": "__integration__",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
11
package.json
11
package.json
@@ -13,6 +13,7 @@
|
||||
"scripts": {
|
||||
"start": "gulp",
|
||||
"test": "jest",
|
||||
"integration": "jest -c jest-integration.json",
|
||||
"release": "gulp release",
|
||||
"release:beta": "gulp release --beta",
|
||||
"lint": "jsxhint src",
|
||||
@@ -28,12 +29,6 @@
|
||||
"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",
|
||||
@@ -66,8 +61,8 @@
|
||||
"classnames": "^1.2.0",
|
||||
"coveralls": "^2.11.2",
|
||||
"deep-extend": "^0.4.0",
|
||||
"dockerode": "^2.1.4",
|
||||
"exec": "0.2.0",
|
||||
"dockerode": "^2.1.4",
|
||||
"install": "^0.1.8",
|
||||
"jquery": "^2.1.3",
|
||||
"mixpanel": "0.2.0",
|
||||
@@ -102,7 +97,7 @@
|
||||
"gulp-shell": "^0.4.1",
|
||||
"gulp-sourcemaps": "^1.5.2",
|
||||
"gulp-util": "^3.0.4",
|
||||
"jest-cli": "kitematic/jest",
|
||||
"jest-cli": "^0.4.5",
|
||||
"jsxhint": "^0.14.0",
|
||||
"minimist": "^1.1.1",
|
||||
"react-tools": "^0.13.1",
|
||||
|
||||
Reference in New Issue
Block a user