Skip to content

Commit b8fa3bd

Browse files
kptdobeCopilot
andcommitted
test: add registry to conditional fixtures
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c230735 commit b8fa3bd

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎test/integration/conditional-e2e.test.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ const s3Mock = mockClient(S3Client);
2323

2424
describe('Conditional Headers End-to-End', () => {
2525
let handler;
26+
let env;
2627

2728
beforeEach(async () => {
2829
s3Mock.reset();
30+
env = {
31+
AEM_BUCKET_NAME: 'test-bucket',
32+
DA_SITE_BACKENDS: { get: async () => 'da' },
33+
};
2934
handler = await esmock(
3035
'../../src/index.js',
3136
{
@@ -75,7 +80,6 @@ describe('Conditional Headers End-to-End', () => {
7580
},
7681
};
7782

78-
const env = { AEM_BUCKET_NAME: 'test-bucket' };
7983
const resp = await handler.default.fetch(req, env);
8084

8185
assert.strictEqual(resp.status, 304);
@@ -107,11 +111,8 @@ describe('Conditional Headers End-to-End', () => {
107111
formData: async () => formData,
108112
};
109113

110-
const env = {
111-
AEM_BUCKET_NAME: 'test-bucket',
112-
dacollab: {
113-
fetch: async () => ({ status: 200, body: { cancel: () => {} } }),
114-
},
114+
env.dacollab = {
115+
fetch: async () => ({ status: 200, body: { cancel: () => {} } }),
115116
};
116117
const resp = await handler.default.fetch(req, env);
117118

@@ -148,7 +149,6 @@ describe('Conditional Headers End-to-End', () => {
148149
formData: async () => formData,
149150
};
150151

151-
const env = { AEM_BUCKET_NAME: 'test-bucket' };
152152
const resp = await handler.default.fetch(req, env);
153153

154154
assert.strictEqual(resp.status, 412);

0 commit comments

Comments
 (0)