mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-23 01:27:14 +02:00
21 lines
588 B
TypeScript
21 lines
588 B
TypeScript
import {expect} from 'chai';
|
|
import {backendTexts} from '../../../src/common/BackendTexts';
|
|
|
|
|
|
describe('BackendText', () => {
|
|
it('should all number be unique', () => {
|
|
const numbers: number[] = [];
|
|
const getNumbers = (obj: any) => {
|
|
for (const key of Object.keys(obj)) {
|
|
if (typeof obj[key] === 'object') {
|
|
getNumbers(obj[key]);
|
|
continue;
|
|
}
|
|
expect(numbers.indexOf(obj[key])).to.be.equal(-1, 'duplicate backend number id found:' + obj[key]);
|
|
numbers.push(obj[key]);
|
|
}
|
|
};
|
|
getNumbers(backendTexts);
|
|
});
|
|
});
|