Skip to content

Commit

Permalink
Support Windows path in test
Browse files Browse the repository at this point in the history
  • Loading branch information
codeclown committed Dec 3, 2021
1 parent dea208b commit e93cab7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/yamlSchemaService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,13 @@ describe('YAML Schema Service', () => {
const schema = await service.getSchemaForResource('', yamlDock.documents[0]);

expect(requestServiceMock).calledTwice;
expect(requestServiceMock).calledWithExactly('file:///schema.json');
expect(requestServiceMock).calledWithExactly('file:///schema.json#/definitions/schemaArray');
if (process.platform === 'win32') {
expect(requestServiceMock).calledWithExactly('file:///d%3A/schema.json');
expect(requestServiceMock).calledWithExactly('file:///d%3A/schema.json#/definitions/schemaArray');
} else {
expect(requestServiceMock).calledWithExactly('file:///schema.json');
expect(requestServiceMock).calledWithExactly('file:///schema.json#/definitions/schemaArray');
}

expect(schema.schema.type).eqls('array');
});
Expand Down

0 comments on commit e93cab7

Please sign in to comment.