From 0c7b8777632867ab3bd040e479ad584697be4269 Mon Sep 17 00:00:00 2001 From: Jeff McAffer Date: Thu, 8 Oct 2020 19:57:09 -0700 Subject: [PATCH] add slash() calls to fix windows paths --- tests/content/lint-files.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/content/lint-files.js b/tests/content/lint-files.js index 7a918b074731..085a392e4e0c 100644 --- a/tests/content/lint-files.js +++ b/tests/content/lint-files.js @@ -1,4 +1,5 @@ const path = require('path') +const slash = require('slash') const fs = require('fs') const walk = require('walk-sync') const matter = require('@github-docs/frontmatter') @@ -109,11 +110,11 @@ describe('lint-files', () => { } const contentMarkdownAbsPaths = walk(contentDir, mdWalkOptions).sort() - const contentMarkdownRelPaths = contentMarkdownAbsPaths.map(p => path.relative(rootDir, p)) + const contentMarkdownRelPaths = contentMarkdownAbsPaths.map(p => slash(path.relative(rootDir, p))) const contentMarkdownTuples = zip(contentMarkdownRelPaths, contentMarkdownAbsPaths) const reusableMarkdownAbsPaths = walk(reusablesDir, mdWalkOptions).sort() - const reusableMarkdownRelPaths = reusableMarkdownAbsPaths.map(p => path.relative(rootDir, p)) + const reusableMarkdownRelPaths = reusableMarkdownAbsPaths.map(p => slash(path.relative(rootDir, p))) const reusableMarkdownTuples = zip(reusableMarkdownRelPaths, reusableMarkdownAbsPaths) describe.each([...contentMarkdownTuples, ...reusableMarkdownTuples])(