mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
16 lines
525 B
TypeScript
16 lines
525 B
TypeScript
import fs from 'fs/promises';
|
|
import path from 'path';
|
|
import { SuperBlocks } from '../../config/superblocks';
|
|
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)));
|
|
});
|
|
});
|