process-line.test.ts 527 B

12345678910111213141516171819202122
  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. ['##### EOF', null]
  15. ] as const).forEach(([input, expected]) => {
  16. it(input, () => {
  17. expect(processLine(input)).toBe(expected);
  18. });
  19. });
  20. });