process-line.test.ts 498 B

123456789101112131415161718192021
  1. import { describe, it } from 'mocha';
  2. import { processLine } from './process-line';
  3. import expect from 'expect';
  4. describe('processLine', () => {
  5. ([
  6. ['! comment', null],
  7. [' ! comment', null],
  8. ['// xommwnr', null],
  9. ['# comment', null],
  10. [' # comment', null],
  11. ['###id', '###id'],
  12. ['##.class', '##.class'],
  13. ['## EOF', '## EOF']
  14. ] as const).forEach(([input, expected]) => {
  15. it(input, () => {
  16. expect(processLine(input)).toBe(expected);
  17. });
  18. });
  19. });