зеркало из https://github.com/electron/trop.git
13 строки
422 B
TypeScript
13 строки
422 B
TypeScript
import * as commands from '../src/constants';
|
|
|
|
describe('commands', () => {
|
|
it('should all be unique', () => {
|
|
const commandsRecord: Record<string, string> = commands as any;
|
|
const allCommands = Object.keys(commandsRecord)
|
|
.map((key) => commandsRecord[key])
|
|
.sort();
|
|
const uniqueCommands = Array.from(new Set(allCommands)).sort();
|
|
expect(allCommands).toStrictEqual(uniqueCommands);
|
|
});
|
|
});
|