Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,3 @@ jobs:
- run: corepack yarn build # We need the stubs to run the tests

- run: corepack yarn test
env:
NOCK_ENV: replay
2 changes: 1 addition & 1 deletion tests/_registryServer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ switch (process.env.AUTH_TYPE) {
default: throw new Error(`Invalid AUTH_TYPE in env`, {cause: process.env.AUTH_TYPE});
}

if (process.env.NOCK_ENV === `replay`) {
if (process.env.NOCK_ENV !== `record`) {
const originalFetch = globalThis.fetch;
globalThis.fetch = function fetch(i) {
if (!`${i}`.startsWith(
Expand Down
2 changes: 1 addition & 1 deletion tests/recordRequests.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if (process.env.NOCK_ENV === `record`) {
headers: minimalHeaders,
});
};
} else if (process.env.NOCK_ENV === `replay`) {
} else {
const getNockStatement = db.prepare(`SELECT body, json(headers) as headers, status FROM nocks WHERE hash = ?`);

globalThis.fetch = async (input, init) => {
Expand Down
Loading