fix test and remove debug log

pull/8623/head
Mathias Picker 3 years ago
parent 782eff261f
commit a2277830ed

@ -1,47 +0,0 @@
{
"0 debug pnpm:scope": {
"selected": 2,
"total": 4,
"workspacePrefix": "/Users/mathiaspicker/Documents/2023/svelte"
},
"1 debug pnpm:lifecycle": {
"depPath": "/Users/mathiaspicker/Documents/2023/svelte/packages/svelte",
"optional": false,
"script": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"",
"stage": "test",
"wd": "/Users/mathiaspicker/Documents/2023/svelte/packages/svelte"
},
"2 debug pnpm:lifecycle": {
"depPath": "/Users/mathiaspicker/Documents/2023/svelte/packages/svelte",
"line": "sh: vitest: command not found",
"stage": "test",
"stdio": "stderr",
"wd": "/Users/mathiaspicker/Documents/2023/svelte/packages/svelte"
},
"3 info pnpm": {
"err": {
"name": "Error",
"message": "svelte@4.2.0 test: `vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"`\nspawn ENOENT",
"code": "ELIFECYCLE",
"stack": "Error: svelte@4.2.0 test: `vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"`\nspawn ENOENT\n at ChildProcess.<anonymous> (/Users/mathiaspicker/pnpm-global/5/node_modules/.pnpm/pnpm@7.3.0/node_modules/pnpm/dist/pnpm.cjs:94974:22)\n at ChildProcess.emit (node:events:513:28)\n at maybeClose (node:internal/child_process:1091:16)\n at Socket.<anonymous> (node:internal/child_process:449:11)\n at Socket.emit (node:events:513:28)\n at Pipe.<anonymous> (node:net:313:12)"
}
},
"4 error pnpm": {
"code": "ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL",
"errno": "ENOENT",
"syscall": "spawn",
"file": "sh",
"pkgid": "svelte@4.2.0",
"stage": "test",
"script": "vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"",
"pkgname": "svelte",
"prefix": "/Users/mathiaspicker/Documents/2023/svelte/packages/svelte",
"err": {
"name": "pnpm",
"message": "svelte@4.2.0 test: `vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"`\nspawn ENOENT",
"code": "ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL",
"stack": "Error: svelte@4.2.0 test: `vitest run && echo \"manually check that there are no type errors in test/types by opening the files in there\"`\nspawn ENOENT\n at ChildProcess.<anonymous> (/Users/mathiaspicker/pnpm-global/5/node_modules/.pnpm/pnpm@7.3.0/node_modules/pnpm/dist/pnpm.cjs:94974:22)\n at ChildProcess.emit (node:events:513:28)\n at maybeClose (node:internal/child_process:1091:16)\n at Socket.<anonymous> (node:internal/child_process:449:11)\n at Socket.emit (node:events:513:28)\n at Pipe.<anonymous> (node:net:313:12)"
}
},
"5 warn pnpm:global": " Local package.json exists, but node_modules missing, did you mean to install?"
}

@ -1,13 +1,12 @@
let fulfil;
const thePromise = new Promise(f => {
const thePromise = new Promise((f) => {
fulfil = f;
});
export default {
props: {
show: true,
thePromise
get props() {
return { show: true, thePromise };
},
html: `
@ -17,23 +16,31 @@ export default {
test({ assert, component, target }) {
fulfil(42);
return thePromise
.then(() => {
assert.htmlEqual(target.innerHTML, `
return thePromise.then(() => {
assert.htmlEqual(
target.innerHTML,
`
<p>the value is 42</p>
`);
`
);
component.show = false;
component.show = false;
assert.htmlEqual(target.innerHTML, `
assert.htmlEqual(
target.innerHTML,
`
<p>Else</p>
`);
`
);
component.show = true;
component.show = true;
return assert.htmlEqual(target.innerHTML, `
<p>the value is 42</p>
`);
});
return assert.htmlEqual(
target.innerHTML,
`
<p>the value is 42</p>
`
);
});
}
};

Loading…
Cancel
Save