Skip to content

Commit

Permalink
Adjusted loader test to correspond with parseAll function's output
Browse files Browse the repository at this point in the history
  • Loading branch information
Haruki1707 committed May 22, 2024
1 parent b0b3c6c commit 53bc570
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ it('creates a file for each lang', () => {
const langPath = __dirname + '/fixtures/lang/';
const files = generateFiles(langPath, parseAll(langPath));

expect(files.length).toBe(4);
expect(files.length).toBe(3);
expect(files[0].name).toBe('php_en.json');
expect(files[1].name).toBe('php_fr.json');
expect(files[2].name).toBe('php_pt.json');
expect(files[3].name).toBe('php_vendor.json');

const langEn = JSON.parse(fs.readFileSync(langPath + files[0].name).toString());
expect(langEn['auth.failed']).toBe('These credentials do not match our records.');
Expand All @@ -25,7 +24,7 @@ it('creates a file for each lang', () => {

it('merges published package translations into each lang .json', () => {
const langPath = __dirname + '/fixtures/lang/';
const files = generateFiles(langPath, prepareExtendedParsedLangFiles([langPath]));
const files = generateFiles(langPath, parseAll(langPath));

expect(files.length).toBe(3);
expect(files[0].name).toBe('php_en.json');
Expand Down

0 comments on commit 53bc570

Please sign in to comment.