Skip to content

Commit

Permalink
fix: remove snapshot test for Deploy plugin response syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
khendrikse committed Oct 6, 2023
1 parent 1564e86 commit d2cf3a2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 53 deletions.
52 changes: 0 additions & 52 deletions packages/build/tests/deploy/snapshots/tests.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,58 +51,6 @@ Generated by [AVA](https://avajs.dev).
(Netlify Build completed in 1ms)␊
Build step duration: Netlify Build completed in 1ms`

## Deploy plugin response syntax error

> Snapshot 1
`␊
Netlify Build ␊
────────────────────────────────────────────────────────────────␊
> Version␊
@netlify/build 1.0.0␊
> Flags␊
buildbotServerSocket: /test/socket␊
debug: true␊
repositoryRoot: packages/build/tests/deploy/fixtures/empty␊
testOpts:␊
pluginsListUrl: test␊
silentLingeringProcesses: true␊
> Current directory␊
packages/build/tests/deploy/fixtures/empty␊
> Config file␊
packages/build/tests/deploy/fixtures/empty/netlify.toml␊
> Resolved config␊
build:␊
publish: packages/build/tests/deploy/fixtures/empty␊
publishOrigin: default␊
> Context␊
production␊
Deploy site ␊
────────────────────────────────────────────────────────────────␊
Internal error during "Deploy site" ␊
────────────────────────────────────────────────────────────────␊
Error message␊
Invalid response from buildbot: SyntaxError: Unexpected token e in JSON at position 1␊
Error location␊
During Deploy site␊
STACK TRACE␊
Resolved config␊
build:␊
publish: packages/build/tests/deploy/fixtures/empty␊
publishOrigin: default`

## Deploy plugin response system error

> Snapshot 1
Expand Down
Binary file modified packages/build/tests/deploy/snapshots/tests.js.snap
Binary file not shown.
3 changes: 2 additions & 1 deletion packages/build/tests/deploy/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ test('Deploy plugin response syntax error', async (t) => {
const { address, stopServer } = await startDeployServer({ response: 'test' })
try {
const output = await new Fixture('./fixtures/empty').withFlags({ buildbotServerSocket: address }).runWithBuild()
t.snapshot(normalizeOutput(output))
// This shape of this error can change with different Node.js versions.
t.true(output.includes('Invalid response from buildbot: SyntaxError: Unexpected token'))
} finally {
await stopServer()
}
Expand Down

0 comments on commit d2cf3a2

Please sign in to comment.