Skip to content

Commit

Permalink
tests: fix windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Oct 31, 2023
1 parent bf635f9 commit 6ec110d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use strict'

// Import
const { join, sep } = require('node:path')
const { deepEqual } = require('assert-helpers')
const kava = require('kava')
const scandirectory = require('./index.js')

// Prepare
const path = require('path').join(__dirname, '..', 'test-fixtures')
const path = join(__dirname, '..', 'test-fixtures')

// Test
kava.suite('scandirectory', function (suite, test) {
Expand All @@ -15,7 +16,7 @@ kava.suite('scandirectory', function (suite, test) {
list: {
'a file.txt': 'file',
'a directory': 'dir',
'a directory/a sub file.txt': 'file',
[`a directory${sep}a sub file.txt`]: 'file',
},
tree: {
'a file.txt': true,
Expand Down Expand Up @@ -90,7 +91,7 @@ kava.suite('scandirectory', function (suite, test) {
list: {
'a file.txt': 'contents of a file\n',
'a directory': 'dir',
'a directory/a sub file.txt': 'contents of a sub file\n',
[`a directory${sep}a sub file.txt`]: 'contents of a sub file\n',
},
tree: {
'a file.txt': 'contents of a file\n',
Expand Down

0 comments on commit 6ec110d

Please sign in to comment.