Skip to content

Commit 2ee4347

Browse files
committed
Ensure all the test use the fail method
1 parent 964103a commit 2ee4347

File tree

3 files changed

+45
-50
lines changed

3 files changed

+45
-50
lines changed

.github/workflows/CI.yml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,46 +11,47 @@ jobs:
1111
node-version: [10.x, 12.x, 14.x]
1212

1313
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Use node version ${{ matrix.node-version }}
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
21-
- name: Setup Testing Infra
22-
run: |
23-
cd test
24-
npm install
25-
26-
- name: "CommonJS Test"
27-
run: |
28-
cd test/cjs
29-
npm run test
30-
31-
- name: "ES Modules Test"
32-
run: |
33-
cd test/esm-node-native
34-
npm run test
35-
if: ${{ matrix.node-version == "14.x" }}
36-
37-
- name: "Validate ES Modules == CommonJS"
38-
run: |
39-
cd test/validateModuleExportsMatchCommonJS
40-
npm run test
41-
if: ${{ matrix.node-version == "14.x" }}
42-
43-
- name: "Rollup Tree-shaking Test"
44-
run: |
45-
cd test/rollup-modules
46-
npm run test
47-
48-
- name: "Webpack Tree-shaking Test"
49-
run: |
50-
cd test/webpack-modules
51-
npm run test
52-
53-
- name: "Snowpack Tree-shaking Test"
54-
run: |
55-
cd test/snowpack-modules
56-
npm run test
14+
- uses: actions/checkout@v2
15+
16+
- name: Use node version ${{ matrix.node-version }}
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: ${{ matrix.node-version }}
20+
21+
- name: Setup Testing Infra
22+
run: |
23+
cd test
24+
npm install
25+
26+
- name: "CommonJS Test"
27+
run: |
28+
cd test/cjs
29+
npm run test
30+
31+
- name: "ES Modules Test"
32+
run: |
33+
cd test/esm-node-native
34+
npm run test
35+
if: ${{ matrix.node-version == '14.x' }}
36+
37+
- name: "Validate ES Modules == CommonJS"
38+
run: |
39+
cd test/validateModuleExportsMatchCommonJS
40+
npm run test
41+
if: ${{ matrix.node-version == '14.x' }}
42+
43+
- name: "Rollup Tree-shaking Test"
44+
run: |
45+
cd test/rollup-modules
46+
npm run test
47+
48+
- name: "Webpack Tree-shaking Test"
49+
run: |
50+
cd test/webpack-modules
51+
npm run test
52+
53+
- name: "Snowpack Tree-shaking Test"
54+
run: |
55+
cd test/snowpack-modules
56+
npm run test
57+
if: ${{ matrix.node-version == '14.x' }}

test/webpack-modules/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
import { __awaiter } from "tslib";
2-
3-
export const testFunction = (textToPrint) => __awaiter(void 0, void 0, void 0, function* () {
4-
console.log(`State: ${textToPrint}`);
5-
});
6-
7-
testFunction("Works")
2+
if (typeof __awaiter !== "function") throw new Error("Missing expected helper __awaiter");

test/webpack-modules/webpack.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const config = {
77
output: {
88
path: path.join(process.cwd(), 'build')
99
}
10-
1110
}
1211

1312
module.exports = config

0 commit comments

Comments
 (0)