Skip to content

Commit 46b6fe1

Browse files
committed
Fix tests on windows
1 parent 8c34bde commit 46b6fe1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/archivist/services/index.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import fs from 'fs/promises';
2+
import path from 'path';
23

34
import chai from 'chai';
45
import sinon from 'sinon';
@@ -186,7 +187,7 @@ describe('Services', () => {
186187
it('reads from correct file path', async () => {
187188
await loadServiceDeclaration(serviceId);
188189

189-
expect(readFile).to.have.been.calledWith(sinon.match(filePath => filePath.endsWith('/serviceA.json')));
190+
expect(readFile).to.have.been.calledWith(sinon.match(filePath => filePath.endsWith(`${path.sep}serviceA.json`)));
190191
});
191192
});
192193

@@ -239,7 +240,7 @@ describe('Services', () => {
239240
it('checks for file existence', async () => {
240241
await loadServiceFilters(serviceId);
241242

242-
expect(access).to.have.been.calledWith(sinon.match(filePath => filePath.endsWith('/serviceWithoutFilters.filters.js')));
243+
expect(access).to.have.been.calledWith(sinon.match(filePath => filePath.endsWith(`${path.sep}serviceWithoutFilters.filters.js`)));
243244
});
244245
});
245246

0 commit comments

Comments
 (0)