oxc/tasks/coverage
Dunqing d63c50a5ca
refactor(semantic): improve check private identifier implementation (#1794)
The regression case in typescript is as expected since we don't
currently store `AccessorProperty` in `ClassTable`.

The following code is one of those cases

```ts
class C1 {
    accessor #a: any;
    accessor #b = 1;
    static accessor #c: any;
    static accessor #d = 2;

    constructor() {
        this.#a = 3;
        this.#b = 4;
    }

    static {
        this.#c = 5;
        this.#d = 6;
    }
}
```

But there was an error

```shell
Expect to Parse: "conformance/classes/propertyMemberDeclarations/autoAccessor2.ts"
  × Private field 'a' must be declared in an enclosing class
    ╭─[conformance/classes/propertyMemberDeclarations/autoAccessor2.ts:9:1]
  9 │     constructor() {
 10 │         this.#a = 3;
    ·              ──
 11 │         this.#b = 4;
    ╰────
```

Let's leave it alone for now. Because of the `AccessorProperty` I
haven't seen it in any repo.
2023-12-26 20:39:22 +08:00
..
babel@7c29fbc4db chore: update snapshots 2023-11-28 16:27:10 +08:00
misc fix(parser): await in jsx expression 2023-12-19 20:23:16 +08:00
src feat(ast): implement new proposal-import-attributes (#1476) 2023-11-25 15:56:09 +08:00
test262@467a0fe68f chore: update snapshots 2023-11-28 16:27:10 +08:00
typescript@b6121e400c chore: update snapshots 2023-11-28 16:27:10 +08:00
Cargo.toml chore(deps): bump the dependencies group with 5 updates (#1808) 2023-12-25 15:17:47 +08:00
codegen_babel.snap chore: update snapshots 2023-11-28 16:27:10 +08:00
codegen_misc.snap fix(parser): await in jsx expression 2023-12-19 20:23:16 +08:00
codegen_test262.snap chore: update snapshots 2023-11-28 16:27:10 +08:00
codegen_typescript.snap chore: update snapshots 2023-11-28 16:27:10 +08:00
minifier_babel.snap chore: update snapshots 2023-11-28 16:27:10 +08:00
minifier_test262.snap chore: update snapshots 2023-11-28 16:27:10 +08:00
parser_babel.snap fix(parser): false postive for "Missing initializer in const declaration" in declare + namespace (#1724) 2023-12-18 17:03:42 +08:00
parser_misc.snap fix(parser): await in jsx expression 2023-12-19 20:23:16 +08:00
parser_test262.snap refactor(semantic): improve check private identifier implementation (#1794) 2023-12-26 20:39:22 +08:00
parser_typescript.snap refactor(semantic): improve check private identifier implementation (#1794) 2023-12-26 20:39:22 +08:00
README.md chore(coverage): remove mention of git submodule update --remote in README 2023-04-01 10:57:25 +08:00

Coverage

The parser is tested against test262, babel and TypeScript for conformance.

Note: tests against regexp are disabled for now.

Clone the test files beforehand:

git submodule update --init

Development

# full run
cargo coverage
cargo coverage js # for test262
cargo coverage babel # for babel
cargo coverage ts # for typescript

# run in watch
cargo watch -x 'coverage js'

# filter for a file path
cargo watch -x 'coverage js --filter filter-file-path'