Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: testing-library/angular-testing-library
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.7.0
Choose a base ref
...
head repository: testing-library/angular-testing-library
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.7.1
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on May 15, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c3cdc57 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5bf154f View commit details

Commits on May 18, 2021

  1. fix: add safety check around process before cleaning up (#218)

    This fixes the problems with Karma.
    timdeschryver authored May 18, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    79019d5 View commit details
Showing with 22 additions and 5 deletions.
  1. +9 −0 .all-contributorsrc
  2. +2 −1 .github/workflows/ci.yml
  3. +1 −0 README.md
  4. +10 −4 projects/testing-library/src/lib/testing-library.ts
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -216,6 +216,15 @@
"contributions": [
"infra"
]
},
{
"login": "jwillebrands",
"name": "Jan-Willem Willebrands",
"avatar_url": "https://avatars.githubusercontent.com/u/8925?v=4",
"profile": "https://github.com/jwillebrands",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 7,
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -2,9 +2,10 @@ name: ci

on:
push:
pull_request:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]

jobs:
build_test_release:
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -213,6 +213,7 @@ Thanks goes to these people ([emoji key][emojis]):
</tr>
<tr>
<td align="center"><a href="https://github.com/amitmiran137"><img src="https://avatars.githubusercontent.com/u/47772523?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amit Miran</b></sub></a><br /><a href="#infra-amitmiran137" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://github.com/jwillebrands"><img src="https://avatars.githubusercontent.com/u/8925?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jan-Willem Willebrands</b></sub></a><br /><a href="https://github.com/testing-library/angular-testing-library/commits?author=jwillebrands" title="Code">💻</a></td>
</tr>
</table>

14 changes: 10 additions & 4 deletions projects/testing-library/src/lib/testing-library.ts
Original file line number Diff line number Diff line change
@@ -352,10 +352,16 @@ function cleanupAtFixture(fixture) {
mountedFixtures.delete(fixture);
}

if (typeof afterEach === 'function' && !process.env.ATL_SKIP_AUTO_CLEANUP) {
afterEach(async () => {
cleanup();
});
// if we're running in a test runner that supports afterEach
// then we'll automatically run cleanup afterEach test
// this ensures that tests run in isolation from each other
// if you don't like this, set the ATL_SKIP_AUTO_CLEANUP env variable to 'true'
if (typeof process === 'undefined' || !process.env?.ATL_SKIP_AUTO_CLEANUP) {
if (typeof afterEach === 'function') {
afterEach(() => {
cleanup();
});
}
}

// TODO: rename to `atl-wrapper-component`