Skip to content

Instantly share code, notes, and snippets.

View Lgofk's full-sized avatar
:octocat:
Slappin' on keyboard

Dmitry Verkhovetsky Lgofk

:octocat:
Slappin' on keyboard
  • Digital Sight
  • Ukraine
View GitHub Profile
@Lgofk
Lgofk / config.toml
Last active March 9, 2024 21:13
pwnagotchi config file
main.name = "pwnagotchi"
main.lang = "en"
main.whitelist = [
"EXAMPLE_NETWORK",
"ANOTHER_EXAMPLE_NETWORK",
"fo:od:ba:be:fo:od",
"fo:od:ba"
]
main.plugins.grid.enabled = true
@Lgofk
Lgofk / NEST-FULL-COVERAGE.md
Created May 28, 2021 19:55
NestJS coverage configuration for combined unit & e2e test runs

Setup

  1. Edit package.json Jest configuration as shown below. The big points are to ensure you have a json reporter and to ensure your coverage is stored in a unique directory for unit tests (in this config its coverage/unit. Also, add the development dependencies shown as they are required for the merge script.
  2. Edit your e2e configuration (test/jest-e2e.json) as shown below. The required "trick" was to ensure that rootDir's subtree includes paths for the e2e tests as well as an source you want to generate coverage for. Using the parent directory includes both test and src so this works. I tried many other methods, like setting collectCoverageFrom to ../src, none of them worked. It appears you must use the parent directory and exclude everything you don't want. Note that it also uses a unique directory for its generated coverage data (coverage/e2e).
  3. Add merge-coverage.ts shown below to your project and run it after you've ran both test sets generating coverage.