Skip to content

Commit

Permalink
bundler testing added
Browse files Browse the repository at this point in the history
  • Loading branch information
naugtur committed Dec 20, 2022
1 parent bfe43dd commit 7b26a11
Show file tree
Hide file tree
Showing 10 changed files with 1,880 additions and 2,366 deletions.
13 changes: 8 additions & 5 deletions test-imports/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ To execute tests, run:
npm test
```

Unless you've edited the test-\*.js files and enabled the `only` command, all individual tests are ignored (marked as failing) and a snapshot of test summary is the only enabled one. It allows you to focus on what changes to Endo impact ecosystem compatibility.

### Testing local instance

To test your local Endo, open `index.mjs` and switch the imports to your local path.
Expand All @@ -26,7 +28,10 @@ Example

```js
import '../../endo/packages/ses/index.js';
import { importLocation } from '../../endo/packages/compartment-mapper/index.js';
import {
importLocation,
makeBundle,
} from '../../endo/packages/compartment-mapper/index.js';
```

## Cases
Expand All @@ -40,7 +45,7 @@ You can manually add test cases to `test-imports/cases` and all files there will

`__snapshots__` folder contains a snapshot of all test results as they're unrealistic to turn 100% green. It's a proxy for detecting changes in ecosystem suport. Might evolve into something more advanced.

For now, if snapshots test is failing, you manually verify if it's a regression or improvement (or both)
For now, if snapshots test is failing, you manually verify if it's a regression or an improvement (or both)

### Adding cases

Expand All @@ -63,9 +68,7 @@ A test case must export `expected` and `actual` - these two will be passed to Av
REJECTED cases can be solved by adding a transform. I'm not listing all cases of rejections because there's just too many
Scaffolding for these tests adds a transform to avoid the most common ones.

## react-dom

Currently missing a peer dependency. Leaving as is to see if Endo update fixes it.
> This section might be outdated compared to actual results as some of the issues might get fixed in Endo.
## typescript

Expand Down
76 changes: 74 additions & 2 deletions test-imports/__snapshots__/test-cjs.mjs.md

Large diffs are not rendered by default.

Binary file modified test-imports/__snapshots__/test-cjs.mjs.snap
Binary file not shown.
71 changes: 69 additions & 2 deletions test-imports/__snapshots__/test-mjs.mjs.md

Large diffs are not rendered by default.

Binary file modified test-imports/__snapshots__/test-mjs.mjs.snap
Binary file not shown.
Loading

0 comments on commit 7b26a11

Please sign in to comment.