Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNovak committed Oct 15, 2021
1 parent 8033089 commit 2ac68ff
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unit/linguini.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ describe('Linguini', (): void => {
let json = linguini.getRaw('regexes.hello', 'en');
expect(json.pattern).to.equal('hello');
});

it('Variable', (): void => {
let greetingOne = linguini.getRaw('intro.greeting', 'en', {
FIRST_NAME: 'Bruce',
LAST_NAME: 'Wayne',
});
expect(greetingOne).to.equal('Hello, nice to meet you Bruce Wayne!');

let greetingTwo = linguini.getRaw('intro.greeting', 'en', {
FIRST_NAME: 'Clark',
LAST_NAME: 'Kent',
});
expect(greetingTwo).to.equal('Hello, nice to meet you Clark Kent!');
});
});

describe('#getRef()', (): void => {
Expand Down

0 comments on commit 2ac68ff

Please sign in to comment.