Skip to content

Commit

Permalink
Revert "chore: fix CI for Windows"
Browse files Browse the repository at this point in the history
This reverts commit 396ef27.
  • Loading branch information
nknapp committed Jul 16, 2024
1 parent a898057 commit 706e675
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion handlebars/helpers/dirTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const _ = {
const pify = require('pify')
const glob = pify(require('glob'))
const debug = require('debug')('thought:helpers')
const path = require('path').posix
const path = require('path')

module.exports = dirTree

Expand Down
4 changes: 1 addition & 3 deletions test/fixtures/shout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
// Output the path of this script relative to the cwd (for the exec-helper-test
const path = require('path').posix;
const myRelativePath = path.relative(process.cwd(), __filename);
console.log(myRelativePath.toUpperCase())
console.log(require('path').relative(process.cwd(), __filename).toUpperCase())
17 changes: 6 additions & 11 deletions test/resolve-package-root-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ chai.use(require('chai-as-promised'))
chai.use(require('dirty-chai'))
const expect = chai.expect
const { resolvePackageRoot } = require('../lib/utils/resolve-package-root')
const path = require('path')

function osIndependent(somePath) {
return somePath.replace(/\//g, path.sep)
}

describe('The "resolve-package-root" utility', function () {
let statSync
Expand All @@ -32,18 +27,18 @@ describe('The "resolve-package-root" utility', function () {
fs.statSync = statSync
})

it('finds a package.json file and provide the relative path of the given file', function () {
it('find a package.json file and provide the relative path of the given file', function () {
return expect(resolvePackageRoot('test/fixtures/mini-project/a/b/test.txt')).to.eventually.deep.equal({
packageRoot: osIndependent('test/fixtures/mini-project'),
relativeFile: osIndependent('a/b/test.txt'),
packageRoot: 'test/fixtures/mini-project',
relativeFile: 'a/b/test.txt',
packageJson: { name: 'mini-project', version: '1.0.0' }
})
})

it('is not be bothered by directory named "package.json"', function () {
it('find not be bothered by directory named "package.json"', function () {
return expect(resolvePackageRoot('test/fixtures/mini-project/a/b/package.json/test.txt')).to.eventually.deep.equal({
packageRoot: osIndependent('test/fixtures/mini-project'),
relativeFile: osIndependent('a/b/package.json/test.txt'),
packageRoot: 'test/fixtures/mini-project',
relativeFile: 'a/b/package.json/test.txt',
packageJson: { name: 'mini-project', version: '1.0.0' }
})
})
Expand Down

0 comments on commit 706e675

Please sign in to comment.