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

Various fixes to jest plugin #843

Merged
merged 28 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3202093
Initial version of jest plugin
Jun 1, 2022
25ac24c
Fixed issue with SDK not compiling due to x32 being used. Added ESM m…
Jun 1, 2022
fa107f3
Don't minify the SDK. Makes it easier to debug. Fix inferPluginName()…
Jun 1, 2022
55abf2e
Ensure that partition is always created when taq test is run
Jun 1, 2022
cb7bba3
Ensure that all packages are using Parcel 2.6.0 and Typescript 4.7.2
Jun 1, 2022
6058e27
Ensure that jest pattern matching works
Jun 1, 2022
abedf30
Use types from protocol is VsX
ac10n May 30, 2022
99fd19c
Apply changes suggested by Michael
ac10n May 31, 2022
f5e7934
undo unnecessary change
ac10n May 31, 2022
3597073
fix versions in dependencies
ac10n May 31, 2022
9ec745d
As a Taqueria dev, I want my code to be automatically formatted so th…
MichalLytek May 31, 2022
a014e2e
Updates to dprint configuration (#813)
ac10n May 31, 2022
c0d7f1a
remove lint step from CI
ac10n Jun 1, 2022
1a6f3f7
Initial version of jest plugin
Jun 1, 2022
7028081
Remove test directory which was accidentally committed
Jun 1, 2022
acd9749
remove lint from pretest
ac10n Jun 1, 2022
af5120e
Ran
Jun 2, 2022
c00ac50
Merged 524-jest-plugin into main-clone
Jun 2, 2022
fb90373
Merged use-protocol-types-in-vscode-extension into main-clone
Jun 2, 2022
75ab31a
Resolved TypeScript error in TS 4.7.2: Property '[taqifiedDirType]' h…
Jun 2, 2022
d135807
Added the ability to debug without needing to be in the project root
Jun 2, 2022
05e0b48
When debugging the vscode plugin and executing the install plugin com…
Jun 2, 2022
961aef6
Revert all vscode changes. Moved those changes to use-protocol-types-…
Jun 2, 2022
3bcf4f7
Fixed issues found by Alex - initializing a new partition also runs t…
Jun 3, 2022
74d652a
Updated package-lock.json
Jun 3, 2022
fde5e1b
Fixed testPattern matching and output buffering
Jun 6, 2022
e213ac3
Fixed issue with state-js package
Jun 6, 2022
e3a100b
Merged main into main-clone
Jun 6, 2022
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ tests/coverage
/taqueria-plugin-tezos-client/index.js.map
/taqueria-state-js/index.js
/taqueria-state-js/index.js.map
/taqueria-state-js/*.d.ts
/taqueria-state-js/node/*.d.ts
/taqueria-plugin-jest/index.js.map
/taqueria-plugin-jest/index.js

Expand Down
180 changes: 90 additions & 90 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion taqueria-plugin-jest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Plugin.create(() => ({
}),
Option.create({
flag: 'testPattern',
shortFlag: 't',
description: 'Run test files that match the provided pattern',
boolean: true,
}),
],
}),
Expand Down
21 changes: 13 additions & 8 deletions taqueria-plugin-jest/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,17 @@ const ensurePartitionExists = (args: Opts) =>
);

const execCmd = (cmd: string, args: string[]) => {
return execa(cmd, args, { reject: false });
const child = execa(cmd, args, {
reject: false,
buffer: false,
// encoding: null,
shell: true,
stdio: 'inherit',
env: { FORCE_COLOR: 'true' },
});
child.stdout?.pipe(process.stdout);
child.stderr?.pipe(process.stdout);
return;
};

export default async (args: RequestArgs.ProxyRequestArgs) => {
Expand All @@ -101,14 +111,9 @@ export default async (args: RequestArgs.ProxyRequestArgs) => {
return ensurePartitionExists(opts)
.then(configAbsPath => {
if (!opts.init) {
const cmd = opts.testPattern
? execCmd('npx', ['jest', '-c', configAbsPath, '-t', opts.testPattern])
return opts.testPattern
? execCmd('npx', ['jest', '-c', configAbsPath, '--testPathPattern', opts.testPattern])
: execCmd('npx', ['jest', '-c', configAbsPath]);

return cmd.then(({ stdout, stderr }) => {
if (stderr) sendErr(stderr);
return sendAsyncRes(stdout);
});
}

return sendAsyncRes('Initialized successfully.');
Expand Down
Loading