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:
Oliver Eyton-Williams
2021-02-02 20:14:29 +01:00
committed by GitHub
parent 2a23c2d989
commit 7640147a07
16 changed files with 399 additions and 1416 deletions

View File

@ -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 = [