Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Apr 12, 2019
1 parent b708803 commit f4a3d0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async function throws(fn: () => Promise<any>): Promise<void> {
}
}

const fixture = name => path.join(__dirname, 'fixtures', name);
const fixture = name => path.join(path.dirname(path.dirname(__dirname)), 'src', 'test', 'fixtures', name);
const readFile = denodeify<string, string, string>(fs.readFile);
function createXMLParser<T>(): (raw: string) => Promise<T> { return denodeify<string, T>(parseString); }

Expand Down Expand Up @@ -226,8 +226,8 @@ describe('readManifest', () => {

it('should patch NLS', () => {
const cwd = fixture('nls');
const raw = require('./fixtures/nls/package.json');
const translations = require('./fixtures/nls/package.nls.json');
const raw = require(path.join(cwd, 'package.json'));
const translations = require(path.join(cwd, 'package.nls.json'));

return readManifest(cwd)
.then((manifest: any) => {
Expand All @@ -239,8 +239,8 @@ describe('readManifest', () => {

it('should not patch NLS if required', () => {
const cwd = fixture('nls');
const raw = require('./fixtures/nls/package.json');
const translations = require('./fixtures/nls/package.nls.json');
const raw = require(path.join(cwd, 'package.json'));
const translations = require(path.join(cwd, 'package.nls.json'));

return readManifest(cwd, false)
.then((manifest: any) => {
Expand Down

0 comments on commit f4a3d0d

Please sign in to comment.