The Wayback Machine - https://web.archive.org/web/20201104074846/https://github.com/pnpm/pnpm/issues/2858
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

Use Jest for testing instead of tape #2858

Open
zkochan opened this issue Sep 14, 2020 · 8 comments
Open

Use Jest for testing instead of tape #2858

zkochan opened this issue Sep 14, 2020 · 8 comments

Comments

@zkochan
Copy link
Member

@zkochan zkochan commented Sep 14, 2020

  • /pnpm/packages/audit - #2862
  • /pnpm/packages/package-store a86209b
  • /pnpm/packages/cafs #2867
  • /pnpm/packages/client #2877
  • /pnpm/packages/fetch #2878
  • /pnpm/packages/filter-lockfile #2887
  • /pnpm/packages/filter-workspace-packages #2887
  • /pnpm/packages/find-packages #2887
  • /pnpm/packages/find-workspace-packages #2887
  • /pnpm/packages/dependencies-hierarchy @zkochan
  • /pnpm/packages/list @zkochan
  • /pnpm/packages/default-resolver @juanpicado
  • /pnpm/packages/dependency-path @juanpicado
  • /pnpm/packages/config @juanpicado
  • /pnpm/packages/lifecycle @statianzo #2907
  • /pnpm/packages/link-bins @statianzo #2907
  • /pnpm/packages/local-resolver @statianzo #2909
  • /pnpm/packages/lockfile-file @statianzo #2909
  • /pnpm/packages/lockfile-utils @statianzo #2909
  • /pnpm/packages/manifest-utils @statianzo #2913
  • /pnpm/packages/matcher @statianzo #2913
  • /pnpm/packages/modules-yaml @statianzo #2913
  • /pnpm/packages/npm-registry-agent @statianzo #2913
  • /pnpm/packages/git-fetcher @juanpicado #2924
  • /pnpm/packages/global-bin-dir @juanpicado #2924
  • /pnpm/packages/resolve-dependencies @zkochan
  • /pnpm/packages/outdated @juanpicado #2953
  • /pnpm/packages/package-bins @juanpicado #2953
  • /pnpm/packages/pnpmfile @juanpicado #2953
  • /pnpm/packages/plugin-commands-installation @zkochan #2956
  • /pnpm/packages/default-reporter
  • /pnpm/packages/git-resolver
  • /pnpm/packages/headless
  • /pnpm/packages/make-dedicated-lockfile
  • /pnpm/packages/npm-resolver
  • /pnpm/packages/package-is-installable
  • /pnpm/packages/package-requester
  • /pnpm/packages/parse-cli-args
  • /pnpm/packages/pkgs-graph
  • /pnpm/packages/plugin-commands-audit
  • /pnpm/packages/plugin-commands-import
  • /pnpm/packages/plugin-commands-listing
  • /pnpm/packages/plugin-commands-outdated
  • /pnpm/packages/plugin-commands-publishing
  • /pnpm/packages/plugin-commands-rebuild
  • /pnpm/packages/plugin-commands-script-runners
  • /pnpm/packages/plugin-commands-store
  • /pnpm/packages/pnpm
  • /pnpm/packages/prune-lockfile
  • /pnpm/packages/read-package-json
  • /pnpm/packages/read-project-manifest
  • /pnpm/packages/server
  • /pnpm/packages/supi
  • /pnpm/packages/tarball-fetcher
  • /pnpm/packages/tarball-resolver
  • /pnpm/packages/write-project-manifest
  • /pnpm/privatePackages/assert-project
  • /pnpm/privatePackages/assert-store
@zkochan zkochan changed the title Use Jest Use Jest for testing instead of tape Sep 14, 2020
@juanpicado
Copy link
Member

@juanpicado juanpicado commented Sep 14, 2020

Should it has a central config file which each package extend from ?

@zkochan
Copy link
Member Author

@zkochan zkochan commented Sep 14, 2020

@juanpicado
Copy link
Member

@juanpicado juanpicado commented Sep 14, 2020

I'll give a try 👍 with /pnpm/packages/audit and root config, small enough for getting started.

zkochan pushed a commit that referenced this issue Sep 16, 2020
PR #2862
ref #2858
Co-authored-by: Zoltan Kochan <[email protected]>
@zkochan zkochan pinned this issue Sep 17, 2020
zkochan added a commit that referenced this issue Sep 17, 2020
ref #2858
@juanpicado
Copy link
Member

@juanpicado juanpicado commented Sep 18, 2020

My next after cafs is client, fetch.

zkochan added a commit that referenced this issue Sep 21, 2020
Migrated the following packages:
@pnpm/list
dependencies-hierarchy

ref #2858
@juanpicado juanpicado mentioned this issue Sep 22, 2020
4 of 4 tasks complete
@juanpicado
Copy link
Member

@juanpicado juanpicado commented Sep 24, 2020

@zkochan some of the packages in the list do not have any test, what do we do ? scratch them? in order to don't create confusion I mean.

@zkochan
Copy link
Member Author

@zkochan zkochan commented Sep 24, 2020

delete or strikethrough

@zkochan
Copy link
Member Author

@zkochan zkochan commented Sep 25, 2020

Some of the projects have too many tests (like supi), so I suggest to convert them partially at the beginning. So part of the tests will run on jest and some will stay on tape during a transition period.

@juanpicado
Copy link
Member

@juanpicado juanpicado commented Sep 28, 2020

@zkochan I updated the list, removed those do not contain test folder.

zkochan pushed a commit that referenced this issue Oct 2, 2020
* chore: lifecycle to jest

Added `.default` when asserting the async import of `output.json`.

When run via Jest, the import resolves to an object `{"0": "install",
default: ["install"]}`, when previously it resolved to `["install"]`.

* chore: link-bins to jest

Specific `testMatch` used to not include `.js` files within fixtures.

Removed unused `devDependencies`

ref #2858
PR #2907
zkochan pushed a commit that referenced this issue Oct 4, 2020
* chore: local-resolver to jest

* chore: lockfile-file to jest

* chore: lockfile-utils to jest

* style: fix

PR #2909
ref #2858
zkochan pushed a commit that referenced this issue Oct 7, 2020
* chore: manifest-utils to jest

* chore: matcher to jest

* chore: modules-yaml to jest

* chore: npm-registry-agent to jest

Replaced `proxyquire` with jest mocking

Fixed `OPTS.strictSSL` fixture to be a boolean as that's what the
agent's option type expects.

`npm-registry-agent` self-links as a devDependency for importing

PR #2913
ref #2858
zkochan pushed a commit that referenced this issue Oct 14, 2020
PR #2924
ref #2858
@juanpicado juanpicado mentioned this issue Oct 24, 2020
3 of 3 tasks complete
zkochan added a commit that referenced this issue Oct 25, 2020
zkochan added a commit that referenced this issue Oct 26, 2020
* test: migrate pnpmfile to jest

* test: migrate package-bins to jest

* test: migrate outdated to jest

* chore: fix manifest updater

* test: remove redundant file

PR #2953
ref #2858

Co-authored-by: Zoltan Kochan <[email protected]>
zkochan added a commit that referenced this issue Oct 28, 2020
zkochan added a commit that referenced this issue Oct 28, 2020
zkochan added a commit that referenced this issue Oct 28, 2020
zkochan added a commit that referenced this issue Oct 28, 2020
ref #2858
PR #2956
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.