Skip to content

Commit

Permalink
chore: test exports on nodejs matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
agoldis committed Mar 18, 2023
1 parent 38abad1 commit 35851c9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/e2e-exports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:

jobs:
e2e-smoke:
e2e-exports:
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')"
runs-on: ubuntu-latest
env:
Expand All @@ -16,11 +16,15 @@ jobs:
ports:
- 1234:1234

strategy:
matrix:
node-version: ["18", "16"]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci
Expand Down
4 changes: 3 additions & 1 deletion examples/exports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"testexports": "concurrently \"npm:test:*\"",
"test:run:cjs": "node ./run.cjs.js",
"test:run:esm": "ts-node ./run.esm.ts",
"test:run:mjs": "ts-node ./run.mjs",
"test:plugin:esm": "ts-node ./plugin.esm.ts",
"test:plugin:cjs": "node ./plugin.cjs.js"
"test:plugin:cjs": "node ./plugin.cjs.js",
"test:plugin:mjs": "node ./plugin.mjs"
},
"dependencies": {
"cypress-cloud": "*"
Expand Down
6 changes: 6 additions & 0 deletions examples/exports/plugin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import assert from "assert";
import cloudPluginDefault, { cloudPlugin } from "cypress-cloud/plugin";

assert(typeof cloudPluginDefault === "function");
assert(typeof cloudPlugin === "function");
assert(cloudPluginDefault === cloudPlugin);
4 changes: 4 additions & 0 deletions examples/exports/run.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import assert from "assert";
import { run } from "cypress-cloud";

assert(typeof run === "function");
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cypress-cloud/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "source-map-support/register";
import "source-map-support/register.js";

import { run as internalRun } from "./lib/run";
import { CurrentsRunAPI } from "./types";
Expand Down

0 comments on commit 35851c9

Please sign in to comment.