Skip to content

Commit 2affa17

Browse files
test(message-parser): decouple parser tests from production helpers (#39086)
1 parent 5f01b24 commit 2affa17

30 files changed

+184
-54
lines changed

packages/message-parser/tests/abuse.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { paragraph, plain, bold, italic, strike } from '../src/utils';
2+
import { paragraph, plain, bold, italic, strike } from './helpers';
33

44
test.each([
55
[

packages/message-parser/tests/any.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { paragraph, plain } from '../src/utils';
2+
import { paragraph, plain } from './helpers';
33

44
test.each([
55
['free text', [paragraph([plain('free text')])]],

packages/message-parser/tests/blockquotes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { paragraph, plain, quote, bold } from '../src/utils';
2+
import { paragraph, plain, quote, bold } from './helpers';
33

44
test.each([
55
[

packages/message-parser/tests/codeFence.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { paragraph, plain, codeLine, code } from '../src/utils';
2+
import { paragraph, plain, codeLine, code } from './helpers';
33

44
const multiply = <T>(a: number, element: T): Array<T> => Array.from({ length: a }, () => element);
55

packages/message-parser/tests/color.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { color, paragraph, plain } from '../src/utils';
2+
import { color, paragraph, plain } from './helpers';
33

44
test.each([
55
['color:#ccc', [paragraph([color(0xcc, 0xcc, 0xcc)])], [paragraph([plain('color:#ccc')])]],

packages/message-parser/tests/email.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { link, paragraph, plain } from '../src/utils';
2+
import { link, paragraph, plain } from './helpers';
33

44
test.each([
55
['[email protected]', [paragraph([link('mailto:[email protected]', [plain('[email protected]')])])]],

packages/message-parser/tests/emoji.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { emoji, bigEmoji, paragraph, plain, emojiUnicode } from '../src/utils';
2+
import { emoji, bigEmoji, paragraph, plain, emojiUnicode } from './helpers';
33

44
test.each([
55
[':smile: asd', [paragraph([emoji('smile'), plain(' asd')])]],

packages/message-parser/tests/emoticons.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { bigEmoji, paragraph, plain, emoticon } from '../src/utils';
2+
import { bigEmoji, paragraph, plain, emoticon } from './helpers';
33

44
test.each([
55
// Should render normal Emojis

packages/message-parser/tests/emphasis.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
mentionChannel,
1313
mentionUser,
1414
inlineCode,
15-
} from '../src/utils';
15+
} from './helpers';
1616

1717
test.each([
1818
['_:smile:_', [paragraph([italic([emoji('smile')])])]],

packages/message-parser/tests/emphasisWithEmoticons.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parse } from '../src';
2-
import { paragraph, plain, bold, italic, emoticon } from '../src/utils';
2+
import { paragraph, plain, bold, italic, emoticon } from './helpers';
33

44
test.each([
55
['*test:*', [paragraph([bold([plain('test:')])])]],

0 commit comments

Comments
 (0)