зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1539530 - Setting up Jest tests with Task Cluster r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D25247 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a1791b1910
Коммит
73b1de3206
|
@ -7,8 +7,8 @@
|
|||
"description": "Network monitor in developer tools",
|
||||
"dependencies": {
|
||||
"babel-plugin-transform-flow-strip-types": "^6.22.0",
|
||||
"babel-plugin-transform-react-jsx": "^6.24.1",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0",
|
||||
"babel-plugin-transform-react-jsx": "^6.24.1",
|
||||
"codemirror": "^5.24.2",
|
||||
"devtools-config": "=0.0.12",
|
||||
"devtools-contextmenu": "=0.0.3",
|
||||
|
@ -25,6 +25,8 @@
|
|||
"reselect": "^3.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node bin/dev-server"
|
||||
}
|
||||
"start": "node bin/dev-server",
|
||||
"test": "jest"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
|
|
@ -6,5 +6,8 @@
|
|||
|
||||
module.exports = {
|
||||
// Extend from the shared list of defined globals for mochitests.
|
||||
"extends": "../../../.eslintrc.mochitests.js"
|
||||
"extends": "../../../.eslintrc.mochitests.js",
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
};
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { Sort, sortReducer} = require("../../src/reducers/sort");
|
||||
const { SORT_BY } = require("../../src/constants");
|
||||
|
||||
describe("sorting reducer", () => {
|
||||
it("it should sort by sort type", () => {
|
||||
const initialState = new Sort();
|
||||
const action = {
|
||||
type: SORT_BY,
|
||||
sortType: "TimeWhen",
|
||||
};
|
||||
const expectedState = {
|
||||
type: "TimeWhen",
|
||||
ascending: true,
|
||||
};
|
||||
|
||||
expect(expectedState).toEqual(sortReducer(initialState, action));
|
||||
});
|
||||
});
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -49,12 +49,16 @@ devtools-tests:
|
|||
yarn test &&
|
||||
cd /builds/worker/checkouts/gecko/devtools/client/webconsole/test &&
|
||||
yarn &&
|
||||
yarn test &&
|
||||
cd /builds/worker/checkouts/gecko/devtools/client/netmonitor/test &&
|
||||
yarn &&
|
||||
yarn test
|
||||
when:
|
||||
files-changed:
|
||||
- 'devtools/client/aboutdebugging-new/src/components/**'
|
||||
- 'devtools/client/framework/components/**'
|
||||
- 'devtools/client/webconsole/**'
|
||||
- 'devtools/client/netmonitor/**'
|
||||
|
||||
eslint-plugin-mozilla:
|
||||
description: eslint-plugin-mozilla integration tests
|
||||
|
|
Загрузка…
Ссылка в новой задаче