1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-11-25 22:32:52 +02:00
Files
pigallery2/test/backend/unit/model/extension/ExtensionRepository.spec.ts
2025-11-07 23:15:13 +01:00

23 lines
744 B
TypeScript

import {expect} from 'chai';
import { readFile } from 'fs/promises';
import {ExtensionRepository} from '../../../../../src/backend/model/extension/ExtensionRepository';
import {ProjectPath} from '../../../../../src/backend/ProjectPath';
import path = require('path');
// to help WebStorm to handle the test cases
declare let describe: any;
declare const after: any;
declare const before: any;
declare const it: any;
describe('ExtensionRepository', () => {
it('should parse MD repo file', async () => {
const text = await readFile(path.join(ProjectPath.Root,'extension/REPOSITORY.md'), 'utf8');
const extensions = (new ExtensionRepository()).repoMD(text);
expect(extensions[0].id).to.deep.equal('sample-extension');
});
});