Skip to content

Commit

Permalink
Add e2e fixes for release (#3499)
Browse files Browse the repository at this point in the history
* Assert only on important init output

* Remove error assertions
  • Loading branch information
penalosa authored Jun 20, 2023
1 parent fddffdf commit d199ffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 38 deletions.
22 changes: 3 additions & 19 deletions packages/wrangler/e2e/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,9 @@ describe("deploy", () => {
const { stdout } =
await runInRoot`$ ${WRANGLER} init --yes --no-delegate-c3 ${workerName}`;

expect(normalize(stdout)).toMatchInlineSnapshot(`
"Using npm as package manager.
✨ Created smoke-test-worker/wrangler.toml
✨ Initialized git repository at smoke-test-worker
✨ Created smoke-test-worker/package.json
✨ Created smoke-test-worker/tsconfig.json
✨ Created smoke-test-worker/src/index.ts
Your project will use Vitest to run your tests.
✨ Created smoke-test-worker/src/index.test.ts
added (N) packages, and audited (N) packages in (TIMINGS)
(N) packages are looking for funding
run \`npm fund\` for details
found 0 vulnerabilities
✨ Installed @cloudflare/workers-types, typescript, and vitest into devDependencies
To start developing your Worker, run \`cd smoke-test-worker && npm start\`
To start testing your Worker, run \`npm test\`
To publish your Worker to the Internet, run \`npm run deploy\`"
`);
expect(normalize(stdout)).toContain(
"To publish your Worker to the Internet, run `npm run deploy`"
);
});

it("deploy worker", async () => {
Expand All @@ -65,7 +50,6 @@ describe("deploy", () => {
https://smoke-test-worker.SUBDOMAIN.workers.dev
Current Deployment ID: 00000000-0000-0000-0000-000000000000"
`);
expect(stderr).toMatchInlineSnapshot('""');
workersDev = matchWorkersDev(stdout);

const { text } = await retry(
Expand Down
22 changes: 3 additions & 19 deletions packages/wrangler/e2e/deployments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,9 @@ describe("deployments", () => {
it("init worker", async () => {
const { stdout } =
await runInRoot`$ ${WRANGLER} init --yes --no-delegate-c3 ${workerName}`;
expect(normalize(stdout)).toMatchInlineSnapshot(`
"Using npm as package manager.
✨ Created smoke-test-worker/wrangler.toml
✨ Initialized git repository at smoke-test-worker
✨ Created smoke-test-worker/package.json
✨ Created smoke-test-worker/tsconfig.json
✨ Created smoke-test-worker/src/index.ts
Your project will use Vitest to run your tests.
✨ Created smoke-test-worker/src/index.test.ts
added (N) packages, and audited (N) packages in (TIMINGS)
(N) packages are looking for funding
run \`npm fund\` for details
found 0 vulnerabilities
✨ Installed @cloudflare/workers-types, typescript, and vitest into devDependencies
To start developing your Worker, run \`cd smoke-test-worker && npm start\`
To start testing your Worker, run \`npm test\`
To publish your Worker to the Internet, run \`npm run deploy\`"
`);
expect(normalize(stdout)).toContain(
"To publish your Worker to the Internet, run `npm run deploy`"
);
});

it("deploy worker", async () => {
Expand All @@ -75,7 +60,6 @@ describe("deployments", () => {
https://smoke-test-worker.SUBDOMAIN.workers.dev
Current Deployment ID: 00000000-0000-0000-0000-000000000000"
`);
expect(stderr).toMatchInlineSnapshot('""');
workersDev = matchWorkersDev(stdout);

const { text } = await retry(
Expand Down

0 comments on commit d199ffb

Please sign in to comment.