Merge pull request #3459 from backstage/blam/fix-windows

chore: use path.join to fix master build on windows
This commit is contained in:
Ben Lambert
2020-11-26 13:19:55 +01:00
committed by GitHub
@@ -16,6 +16,7 @@
import mockFs from 'mock-fs';
import { collectConfigSchemas } from './collect';
import path from 'path';
const mockSchema = {
type: 'object',
@@ -56,7 +57,7 @@ describe('collectConfigSchemas', () => {
await expect(collectConfigSchemas(['a'])).resolves.toEqual([
{
path: 'node_modules/a/package.json',
path: path.join('node_modules', 'a', 'package.json'),
value: mockSchema,
},
]);
@@ -163,15 +164,15 @@ describe('collectConfigSchemas', () => {
await expect(collectConfigSchemas(['a', 'b', 'c'])).resolves.toEqual([
{
path: 'node_modules/a/package.json',
path: path.join('node_modules', 'a', 'package.json'),
value: { ...mockSchema, title: 'inline' },
},
{
path: 'node_modules/b/schema.json',
path: path.join('node_modules', 'b', 'schema.json'),
value: { ...mockSchema, title: 'external' },
},
{
path: 'node_modules/c/schema.d.ts',
path: path.join('node_modules', 'c', 'schema.d.ts'),
value: {
$schema: 'http://json-schema.org/draft-07/schema#',
type: 'object',