Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): updated test regex, some helper scripts #809

Merged
merged 5 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,18 @@ In case you are suggesting a new feature, we will match your idea with our curre
npm run test
```

* Run CLI tests with:

```bash
npm run test:cli
```

* Run tests of all packages:

```bash
npm run test:packages
```

* Test a single CLI test case:

```bash
Expand Down Expand Up @@ -110,6 +122,18 @@ In case you are suggesting a new feature, we will match your idea with our curre
yarn test
```

* Run CLI tests with:

```bash
yarn test:cli`
```

* Run tests of all packages:

```bash
yarn test:packages
```

* Test a single CLI test case:

```bash
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"pretest": "npm run build && npm run lint && npm run tslint",
"reportCoverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json --disable=gcov",
"test": "nyc jest --maxWorkers=4 --reporters=default --reporters=jest-junit",
"test:cli": "nyc jest test/ --maxWorkers=4 --reporters=default --reporters=jest-junit",
"test:packages": "nyc jest packages/ --maxWorkers=4 --reporters=default --reporters=jest-junit",
"test:ci": "nyc jest --maxWorkers=$(nproc) --reporters=default --reporters=jest-junit",
"travis:integration": "npm run build && npm run test && npm run reportCoverage",
"travis:lint": "npm run build && npm run lint && npm run tslint",
Expand Down Expand Up @@ -76,7 +78,10 @@
"transform": {
"^.+\\.(ts)?$": "ts-jest"
},
"testRegex": "/__tests__/.*\\.(test.js|test.ts)$",
"testRegex": [
"/__tests__/.*\\.(test.js|test.ts)$",
"/test/.*\\.(test.js|test.ts)$"
],
"moduleFileExtensions": [
"ts",
"js",
Expand Down
4 changes: 2 additions & 2 deletions test/binCases/stats/single-config/single-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ jest.setTimeout(10E6);

const { run, extractSummary } = require("../../../testUtils");

test("single-config", async done => {
const { code, stdout, stderr } = await run(__dirname);
test("single-config", done => {
const { code, stdout, stderr } = run(__dirname);

const summary = extractSummary(stdout);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ afterEach(() => {
}
});

test.skip("info-verbosity-off", async done => {
test.skip("info-verbosity-off", done => {
var webpackProc = runAndGetWatchProc(__dirname, [
"--entry ",
"./index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ afterEach(() => {
}
});

test.skip("info-verbosity-verbose", async done => {
test.skip("info-verbosity-verbose", done => {
const webpackProc = runAndGetWatchProc(__dirname, [
"--entry ",
"./index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ afterEach(() => {
}
});

test.skip("multi-config-watch-opt", async done => {
test.skip("multi-config-watch-opt", done => {
const webpackProc = runAndGetWatchProc(__dirname, [
"--entry",
"./index.js",
Expand Down
2 changes: 1 addition & 1 deletion test/binCases/watch/multi-config/multi-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ afterEach(() => {
}
});

test.skip("multi-config", async done => {
test.skip("multi-config", done => {
const webpackProc = runAndGetWatchProc(__dirname);

// info-verbosity is set to info by default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ afterEach(() => {
}
});

test.skip("single-config-watch-opt", async done => {
test.skip("single-config-watch-opt", done => {
const webpackProc = runAndGetWatchProc(__dirname, [
"--entry",
"./index.js",
Expand Down
2 changes: 1 addition & 1 deletion test/binCases/watch/single-config/single-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ afterEach(() => {
}
});

test.skip("single-config", async(done) => {
test.skip("single-config", done => {
const webpackProc = runAndGetWatchProc(__dirname, [
"--entry",
"./index.js",
Expand Down