Skip to content

Commit

Permalink
chore: upgrade jest and ts-jest to 29 (#801)
Browse files Browse the repository at this point in the history
* chore: update esbuild and move ts to dev-deps

* chore: upgrade jest and ts-jest to 29
  • Loading branch information
vigneshshanmugam authored Jul 18, 2023
1 parent f275924 commit e827927
Show file tree
Hide file tree
Showing 8 changed files with 6,263 additions and 3,681 deletions.
4 changes: 2 additions & 2 deletions __tests__/formatter/__snapshots__/javascript.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ journey('Recorded journey', async ({ page, context }) => {
const page1Promise = page.waitForEvent('popup');
await page.locator('text=Babel Minify').click();
page1 = await page1Promise;
await page1.locator('a:has-text(\\"smoke\\")').click();
await page1.locator('a:has-text("smoke")').click();
});
step('Close page', async () => {
await page1.close();
Expand Down Expand Up @@ -86,7 +86,7 @@ step('Click text=Babel Minify', async () => {
const page2Promise = page.waitForEvent('popup');
await page.locator('text=Babel Minify').click();
page2 = await page2Promise;
await page2.locator(':nth-match(a:has-text(\\"babel-minify\\"), 3)').click();
await page2.locator(':nth-match(a:has-text("babel-minify"), 3)').click();
});
step('Close page', async () => {
await page2.frame({
Expand Down
8 changes: 4 additions & 4 deletions __tests__/push/__snapshots__/plugin.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`SyntheticsBundlePlugin skip locally resolved synthetics package 1`] = `
"var import__ = require(\\"../../\\");
(0, import__.journey)(\\"journey 1\\", () => {
import__.monitor.use({ id: \\"duplicate id\\" });
(0, import__.step)(\\"step1\\", () => {
"var import__ = require("../../");
(0, import__.journey)("journey 1", () => {
import__.monitor.use({ id: "duplicate id" });
(0, import__.step)("step1", () => {
});
});
"
Expand Down
4 changes: 2 additions & 2 deletions __tests__/push/__snapshots__/request.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ exports[`Push api request format api error 1`] = `
exports[`Push api request format failed monitors 1`] = `
"✖ Error
> Failed to save or update monitor. Configuration is not valid: monitor(monitor-without-schedule)
Invalid value \\"undefined\\" supplied to \\"schedule\\"
Invalid value "undefined" supplied to "schedule"
> Failed to save or update monitor. Configuration is not valid
Invalid value \\"undefined\\" supplied to \\"id\\"
Invalid value "undefined" supplied to "id"
"
`;
Expand Down
202 changes: 101 additions & 101 deletions __tests__/reporters/__snapshots__/json.test.ts.snap

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions __tests__/reporters/__snapshots__/junit.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`junit reporter writes the output to a file 1`] = `
"<testsuites name=\\"\\" tests=\\"1\\" failures=\\"0\\" skipped=\\"1\\" errors=\\"0\\" time=\\"0\\">
<testsuite name=\\"j1\\" tests=\\"1\\" failures=\\"0\\" skipped=\\"1\\" errors=\\"0\\">
<testcase name=\\"s1\\" classname=\\"j1 s1\\" time=\\"1\\">
<skipped message=\\"previous step failed\\">
"<testsuites name="" tests="1" failures="0" skipped="1" errors="0" time="0">
<testsuite name="j1" tests="1" failures="0" skipped="1" errors="0">
<testcase name="s1" classname="j1 s1" time="1">
<skipped message="previous step failed">
</skipped>
</testcase>
</testsuite>
</testsuites>"
`;

exports[`junit reporter writes the output to fd 1`] = `
"<testsuites name=\\"\\" tests=\\"2\\" failures=\\"1\\" skipped=\\"1\\" errors=\\"0\\" time=\\"0\\">
<testsuite name=\\"j1\\" tests=\\"2\\" failures=\\"1\\" skipped=\\"1\\" errors=\\"0\\">
<testcase name=\\"s1\\" classname=\\"j1 s1\\" time=\\"1\\">
<failure message=\\"Boom\\" type=\\"Error\\">
"<testsuites name="" tests="2" failures="1" skipped="1" errors="0" time="0">
<testsuite name="j1" tests="2" failures="1" skipped="1" errors="0">
<testcase name="s1" classname="j1 s1" time="1">
<failure message="Boom" type="Error">
at /__tests/reporters/junit.test.ts
</failure>
</testcase>
<testcase name=\\"s2\\" classname=\\"j1 s2\\" time=\\"1\\">
<skipped message=\\"previous step failed\\">
<testcase name="s2" classname="j1 s2" time="1">
<skipped message="previous step failed">
</skipped>
</testcase>
</testsuite>
Expand Down
16 changes: 8 additions & 8 deletions __tests__/sdk/trace-metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ describe('Trace metrics', () => {
const processEvents = traceEvents.concat(USER_TIMING_EVENTS as any);
const metrics = UserTimings.compute({ processEvents } as any);
expect(metrics).toMatchInlineSnapshot(`
Array [
Object {
"duration": Object {
[
{
"duration": {
"us": 1212635,
},
"name": "Next.js-before-hydration",
"start": Object {
"start": {
"us": 3069484776113,
},
"type": "measure",
},
Object {
{
"name": "beforeRender",
"start": Object {
"start": {
"us": 3069485988763,
},
"type": "mark",
},
Object {
{
"name": "afterHydrate",
"start": Object {
"start": {
"us": 3069486106274,
},
"type": "mark",
Expand Down
Loading

0 comments on commit e827927

Please sign in to comment.