Skip to content

Commit

Permalink
add slash() calls to fix windows paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffmcaffer authored Oct 9, 2020
1 parent d07b0da commit 0c7b877
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/content/lint-files.js
Original file line number Diff line number Diff line change
@@ -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')
Expand Down Expand Up @@ -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])(
Expand Down

0 comments on commit 0c7b877

Please sign in to comment.