feat: curriculum dictionaries to objects (#40878)
* test: update to catch missing comments * feat: convert dictionaries to JSON objects * chore: update dictionaries * fix: update tests for new dictionary objects * fix: convert fixture to json * fix: updated the incomplete dicts to new format
This commit is contained in:
committed by
GitHub
parent
2a23c2d989
commit
7640147a07
@ -60,10 +60,21 @@ It should be in
|
||||
'__fixtures__',
|
||||
'dictionaries'
|
||||
);
|
||||
const incompleteDictDir = path.resolve(
|
||||
__dirname,
|
||||
'__fixtures__',
|
||||
'incomplete-dicts'
|
||||
);
|
||||
|
||||
it('returns an object', () => {
|
||||
expect(typeof createCommentMap(dictionaryDir)).toBe('object');
|
||||
});
|
||||
|
||||
it('throws if an entry is missing', () => {
|
||||
expect.assertions(1);
|
||||
expect(() => createCommentMap(incompleteDictDir)).toThrow();
|
||||
});
|
||||
|
||||
it('returns an object with an expected form', () => {
|
||||
expect.assertions(4);
|
||||
const expectedIds = [
|
||||
|
Reference in New Issue
Block a user