Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): copy README.md while publishing #38

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ globalThis.Testem?.afterTests(async (_config, _data, callback) => {
});
```

![Checking for any leaking classes](https://github.com/mainmatter/memory-leak-detector/blob/main/assets/memory_leak_1.png)

This approach doesn't catch all memory-leaks as it will only detect the ones that have manipulated a window/document objects by e.g. storing references or not removed `addEventListener` calls.

### Asserting object count
Expand Down Expand Up @@ -84,3 +86,5 @@ test("paginating back and forth", async function (assert) {
assert.strictEqual(currentURL(), "users");
});
```

![Checking for specific class in a test](https://github.com/mainmatter/memory-leak-detector/blob/main/assets/memory_leak_2.png)
Binary file added assets/memory_leak_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/memory_leak_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/memory-leak-detector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./README.md
1 change: 0 additions & 1 deletion packages/memory-leak-detector/README.md

This file was deleted.

1 change: 1 addition & 0 deletions packages/memory-leak-detector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"repository": "https://github.com/mainmatter/memory-leak-detector",
"main": "index.js",
"scripts": {
"prepublishOnly": "cp ../../README.md .",
"start": "node server/index.js"
},
"keywords": [],
Expand Down
Loading