Skip to content

Commit 0727525

Browse files
committed
Update README and description
1 parent 8e816db commit 0727525

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

test/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
The tests in the `./tests/` directory were originally copied from the [messageformat project](https://github.com/messageformat/messageformat/tree/11c95dab2b25db8454e49ff4daadb817e1d5b770/packages/mf2-messageformat/src/__fixtures)
22
and are here relicensed by their original author (Eemeli Aro) under the Unicode License.
33

4+
These test files are intended to be useful for testing multiple different message processors in different ways:
5+
6+
- `syntax.json` — Test cases that do not depend on any registry definitions.
7+
8+
- `syntax-errors.json` — Strings that should produce a Syntax Error when parsed.
9+
10+
- `data-model-errors.json` - Strings that should produce Data Model Error when processed.
11+
Error names are defined in ["MessageFormat 2.0 Errors"](../spec/errors.md) in the spec.
12+
13+
- `functions/` — Test cases that correspond to built-in functions.
14+
The behaviour of the built-in formatters is implementation-specific so the `exp` field is often
15+
omitted and assertions are made on error cases.
16+
417
Some examples of test harnesses using these tests, from the source repository:
518

619
- [CST parse/stringify tests](https://github.com/messageformat/messageformat/blob/11c95dab2b25db8454e49ff4daadb817e1d5b770/packages/mf2-messageformat/src/cst/cst.test.ts)

test/tests/data-model-errors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scenario": "Data model errors",
3-
"description": "Each `src` should produce an error when processed. each test description indicates the error reason, but this text should not be asserted against. Error names are defined in the spec.",
3+
"description": "Each `src` should produce an error when processed. Each test description indicates the error reason, but this text should not be asserted against. Error names are defined in the spec.",
44
"defaultTestProperties": {
55
"testType": "syntax",
66
"locale": "en-US",

0 commit comments

Comments
 (0)