mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 23:57:22 +02:00
test: add easy setup for test cases
This commit is contained in:
parent
b477863a30
commit
31d333b82f
69 changed files with 3387 additions and 24 deletions
|
@ -65,6 +65,7 @@ describe('load utils', () => {
|
|||
versions: []
|
||||
}
|
||||
};
|
||||
const test = {arr: [1, 2, 3]};
|
||||
const variable = 'enabledLanguages';
|
||||
expect(idx(a, [('b', 'c')])).toBeUndefined();
|
||||
expect(idx(b, ['hello'])).toEqual('world');
|
||||
|
@ -79,6 +80,7 @@ describe('load utils', () => {
|
|||
'en',
|
||||
'ja'
|
||||
]);
|
||||
expect(idx(test, ['arr', 0])).toEqual(1);
|
||||
expect(idx(undefined)).toBeUndefined();
|
||||
expect(idx(null)).toBeNull();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue