Skip to content

Commit

Permalink
Ensure all the test use the fail method
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Oct 5, 2020
1 parent 964103a commit 2ee4347
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 50 deletions.
87 changes: 44 additions & 43 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,47 @@ jobs:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2

- name: Use node version ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Setup Testing Infra
run: |
cd test
npm install
- name: "CommonJS Test"
run: |
cd test/cjs
npm run test
- name: "ES Modules Test"
run: |
cd test/esm-node-native
npm run test
if: ${{ matrix.node-version == "14.x" }}

- name: "Validate ES Modules == CommonJS"
run: |
cd test/validateModuleExportsMatchCommonJS
npm run test
if: ${{ matrix.node-version == "14.x" }}

- name: "Rollup Tree-shaking Test"
run: |
cd test/rollup-modules
npm run test
- name: "Webpack Tree-shaking Test"
run: |
cd test/webpack-modules
npm run test
- name: "Snowpack Tree-shaking Test"
run: |
cd test/snowpack-modules
npm run test
- uses: actions/checkout@v2

- name: Use node version ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Setup Testing Infra
run: |
cd test
npm install
- name: "CommonJS Test"
run: |
cd test/cjs
npm run test
- name: "ES Modules Test"
run: |
cd test/esm-node-native
npm run test
if: ${{ matrix.node-version == '14.x' }}

- name: "Validate ES Modules == CommonJS"
run: |
cd test/validateModuleExportsMatchCommonJS
npm run test
if: ${{ matrix.node-version == '14.x' }}

- name: "Rollup Tree-shaking Test"
run: |
cd test/rollup-modules
npm run test
- name: "Webpack Tree-shaking Test"
run: |
cd test/webpack-modules
npm run test
- name: "Snowpack Tree-shaking Test"
run: |
cd test/snowpack-modules
npm run test
if: ${{ matrix.node-version == '14.x' }}
7 changes: 1 addition & 6 deletions test/webpack-modules/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
import { __awaiter } from "tslib";

export const testFunction = (textToPrint) => __awaiter(void 0, void 0, void 0, function* () {
console.log(`State: ${textToPrint}`);
});

testFunction("Works")
if (typeof __awaiter !== "function") throw new Error("Missing expected helper __awaiter");
1 change: 0 additions & 1 deletion test/webpack-modules/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const config = {
output: {
path: path.join(process.cwd(), 'build')
}

}

module.exports = config

0 comments on commit 2ee4347

Please sign in to comment.