Skip to content
This repository was archived by the owner on May 4, 2020. It is now read-only.

Commit f5af7a4

Browse files
author
Long Ho
committed
chore: update tests
1 parent ac592fa commit f5af7a4

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

packages/cli/tests/extract/integration_tests/__snapshots__/index.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Options:
130130
--extract-source-location Whether the metadata about the location of the message in the source file should be extracted. If \`true\`, then \`file\`, \`start\`, and \`end\` fields will exist for each extracted message descriptors. (default: false)
131131
--module-source-name <name> The ES6 module source name of the React Intl package. Defaults to: \`\\"react-intl\\"\`, but can be changed to another name/path to React Intl.
132132
--remove-default-message Remove \`defaultMessage\` field in generated js after extraction (default: false)
133-
--additional-component-names <comma-separated-names> Additional component names to extract messages from, e.g: \`['FormattedFooBarMessage']\`. **NOTE**: By default we check for the fact that \`FormattedMessage\` & \`FormattedHTMLMessage\` are imported from \`moduleSourceName\` to make sure variable alias works. This option does not do that so it's less safe.
133+
--additional-component-names <comma-separated-names> Additional component names to extract messages from, e.g: \`['FormattedFooBarMessage']\`. **NOTE**: By default we check for the fact that \`FormattedMessage\` is imported from \`moduleSourceName\` to make sure variable alias works. This option does not do that so it's less safe.
134134
--extract-from-format-message-call Opt-in to extract from \`intl.formatMessage\` call with the same restrictions, e.g: has to be called with object literal such as \`intl.formatMessage({ id: 'foo', defaultMessage: 'bar', description: 'baz'})\` (default: false)
135135
--output-empty-json Output file with empty [] if src has no messages. For build systems like bazel that relies on specific output mapping, not writing out a file can cause issues. (default: false)
136136
--ignore <files> List of glob paths to **not** extract translations from.

packages/ts-transformer/tests/__snapshots__/index.test.ts.snap

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,6 @@ Object {
2424
}
2525
`;
2626

27-
exports[`emit asserts for FormattedHTMLMessage 1`] = `
28-
Object {
29-
"code": "\\"use strict\\";
30-
Object.defineProperty(exports, \\"__esModule\\", { value: true });
31-
const react_1 = require(\\"react\\");
32-
const react_intl_1 = require(\\"react-intl\\");
33-
class Foo extends react_1.Component {
34-
render() {
35-
return (react_1.default.createElement(react_intl_1.FormattedHTMLMessage, { id: 'foo.bar.baz', defaultMessage: '<h1>Hello World!</h1>' }));
36-
}
37-
}
38-
exports.default = Foo;
39-
",
40-
"msgs": Array [
41-
Object {
42-
"defaultMessage": "<h1>Hello World!</h1>",
43-
"description": "The default message.",
44-
"id": "foo.bar.baz",
45-
},
46-
],
47-
}
48-
`;
49-
5027
exports[`emit asserts for FormattedMessage 1`] = `
5128
Object {
5229
"code": "\\"use strict\\";
@@ -418,7 +395,6 @@ class Foo extends react_1.Component {
418395
react_1.default.createElement(\\"p\\", null,
419396
react_1.default.createElement(react_intl_1.FormattedMessage, Object.assign({}, msgs.content))),
420397
react_1.default.createElement(react_intl_1.FormattedMessage, { id: 'foo.bar.zoo', defaultMessage: 'Hello World!' }),
421-
react_1.default.createElement(react_intl_1.FormattedHTMLMessage, { id: 'foo.bar.delta', defaultMessage: '<h1>Hello World!</h1>' })));
422398
}
423399
}
424400
exports.default = Foo;

0 commit comments

Comments
 (0)