Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Nov 17, 2023
1 parent bc8fcd1 commit 16a0de1
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const devServer = await startDevServer({
keepProcessAlive: false,
port: 0,
});
const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "off",
rootDirectoryUrl: new URL("./", import.meta.url),
webServer: {
Expand Down Expand Up @@ -44,7 +44,7 @@ const { testPlanCoverage } = await executeTestPlan({
coverageReportHtml: false,
githubCheckEnabled: false,
});
const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./client/js_syntax_error.js": {
...actual["./client/js_syntax_error.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const result = await executeTestPlan({
});
const actual = result;
const expected = {
testPlanAborted: false,
testPlanSummary: {
aborted: false,
summary: {
counters: {
total: 2,
aborted: 0,
Expand All @@ -47,12 +47,12 @@ const expected = {
},
duration: assert.any(Number),
},
testPlanReport: {
report: {
"client/main.html": {
a: assert.any(Object),
b: assert.any(Object),
},
},
testPlanCoverage: undefined,
coverage: undefined,
};
assert({ actual, expected });
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const devServer = await startDevServer({
keepProcessAlive: false,
port: 0,
});
const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "warn",
rootDirectoryUrl: new URL("./", import.meta.url),
webServer: {
Expand Down Expand Up @@ -55,7 +55,7 @@ const { testPlanCoverage } = await executeTestPlan({
coverageV8ConflictWarning: false,
githubCheckEnabled: false,
});
const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./client/file.js": {
...actual["./client/file.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const devServer = await startDevServer({
keepProcessAlive: false,
port: 0,
});
const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "warn",
rootDirectoryUrl: new URL("./", import.meta.url),
webServer: {
Expand All @@ -34,7 +34,7 @@ const { testPlanCoverage } = await executeTestPlan({
coverageReportHtml: false,
githubCheckEnabled: false,
});
const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./client/file.js": {
...actual["./client/file.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const devServer = await startDevServer({
clientAutoreload: false,
ribbon: false,
});
const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "warn",
rootDirectoryUrl: new URL("./", import.meta.url),
webServer: {
Expand Down Expand Up @@ -64,7 +64,7 @@ if (!process.env.CI) {
fileServer.stop();
}

const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./client/file.js": {
...actual["./client/file.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "@jsenv/test";

const test = async (params) => {
const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "warn",
rootDirectoryUrl: new URL("./", import.meta.url),
testPlan: {
Expand All @@ -29,7 +29,7 @@ const test = async (params) => {
coverageReportHtml: false,
githubCheckEnabled: false,
});
const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./node_client/file.js": {
...actual["./node_client/file.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { assert } from "@jsenv/assert";

import { executeTestPlan, nodeWorkerThread } from "@jsenv/test";

const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "warn",
rootDirectoryUrl: new URL("./", import.meta.url),
testPlan: {
Expand All @@ -32,7 +32,7 @@ const { testPlanCoverage } = await executeTestPlan({
coverageReportHtml: false,
githubCheckEnabled: false,
});
const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./file.js": {
...actual["./file.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const testPlan = {
},
},
};
const { testPlanCoverage } = await executeTestPlan({
const { coverage } = await executeTestPlan({
logLevel: "error",
rootDirectoryUrl: new URL("./", import.meta.url),
testPlan,
Expand All @@ -25,7 +25,7 @@ const { testPlanCoverage } = await executeTestPlan({
},
githubCheckEnabled: false,
});
const actual = testPlanCoverage;
const actual = coverage;
const expected = {
"./main.js": {
...actual["./main.js"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const result = await executeTestPlan({
githubCheckEnabled: false,
});

const chromiumResult = result.testPlanReport["public/main.test.html"].chromium;
const chromiumResult = result.report["public/main.test.html"].chromium;
const actual = {
status: chromiumResult.status,
errorMessage: chromiumResult.errors[0].message,
Expand Down

0 comments on commit 16a0de1

Please sign in to comment.