fix(tools): use correct superblock paths (#45285)
* fix: use array of choices * fix: capture traces from fs promise errors * fix: use helper to get superblock subpath
This commit is contained in:
committed by
GitHub
parent
25c927e79b
commit
108d2460e7
15
tools/challenge-helper-scripts/fs-utils.test.ts
Normal file
15
tools/challenge-helper-scripts/fs-utils.test.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
import { SuperBlocks } from '../../config/certification-settings';
|
||||
import { getSuperBlockSubPath } from './fs-utils';
|
||||
|
||||
describe('getSuperBlockSubPath', () => {
|
||||
it('should return sub-paths that exist', async () => {
|
||||
const subPaths = Object.values(SuperBlocks).map(getSuperBlockSubPath);
|
||||
const paths = subPaths.map(sub =>
|
||||
path.resolve(__dirname, '../../curriculum/challenges/english', sub)
|
||||
);
|
||||
|
||||
await Promise.all(paths.map(path => fs.access(path)));
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user