mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-22 03:35:31 -05:00
WIP: Bringing PyScript.next PoC to the main project (#1507)
* kill unwrapped_remote (#1490) * kill unwrapped_remote * linting * don't use callKwargs for python plugins * fix tests and improve types * Bringing PyScript.next PoC to the main project * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Madhur Tandon <20173739+madhur-tandon@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4467898473
commit
339e40063a
27
pyscript.core/test/_utils.js
Normal file
27
pyscript.core/test/_utils.js
Normal file
@@ -0,0 +1,27 @@
|
||||
const { writeFileShim } = require("../cjs/runtime/_utils.js");
|
||||
|
||||
const assert = require("./assert.js");
|
||||
|
||||
const FS = {
|
||||
mkdir(...args) {
|
||||
this.mkdir_args = args;
|
||||
},
|
||||
cwd: () => __dirname,
|
||||
writeFile(...args) {
|
||||
this.writeFile_args = args;
|
||||
},
|
||||
};
|
||||
|
||||
writeFileShim(FS, "./test/abc.js", []);
|
||||
assert(JSON.stringify(FS.mkdir_args), `["${__dirname}/test"]`);
|
||||
assert(
|
||||
JSON.stringify(FS.writeFile_args),
|
||||
`["${__dirname}/test/abc.js",{},{"canOwn":true}]`,
|
||||
);
|
||||
|
||||
writeFileShim(FS, "/./../abc.js", []);
|
||||
assert(JSON.stringify(FS.mkdir_args), `["${__dirname}"]`);
|
||||
assert(
|
||||
JSON.stringify(FS.writeFile_args),
|
||||
`["${__dirname}/abc.js",{},{"canOwn":true}]`,
|
||||
);
|
||||
Reference in New Issue
Block a user