1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

chore(specs): add jsr and npm env vars to tests by default (#23171)

This commit is contained in:
David Sherret 2024-04-01 21:58:05 -04:00 committed by GitHub
parent 858abbe745
commit ca5e5c7e9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 8 additions and 25 deletions

View file

@ -1,5 +1,4 @@
{
"base": "npm",
"args": "check main.ts",
"output": "main.out",
"exitCode": 1

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"steps": [{
"args": "run main.ts",
"output": "main.out"

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"steps": [{
"args": "run -A analyzable.ts",
"output": "analyzable.out",

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"args": "run main.ts",
"output": "main.out",
"exitCode": 1

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"args": "run main.ts",
"output": "main.out"
}

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"steps": [{
"args": "run main.ts",
"output": "main.out"

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"steps": [{
"args": "run main.ts",
"output": "main.out"

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"steps": [{
"args": "check --all main.ts",
"output": "main.out"

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"args": "check --all main.ts",
"output": "main.check.out",
"exitCode": 1

View file

@ -1,5 +1,4 @@
{
"base": "jsr",
"args": "run -A main.ts",
"output": "main.out",
"exitCode": 1

View file

@ -101,16 +101,13 @@ fn run_test(test: &Test, diagnostic_logger: Rc<RefCell<Vec<u8>>>) {
builder = builder.cwd(cwd.to_string_lossy());
}
if let Some(base) = &metadata.base {
match base.as_str() {
"npm" => {
builder = builder.add_npm_env_vars();
}
"jsr" => {
match &metadata.base {
// todo(dsherret): add bases in the future as needed
Some(base) => panic!("Unknown test base: {}", base),
None => {
// by default add npm and jsr env vars
builder = builder.add_jsr_env_vars().add_npm_env_vars();
}
_ => panic!("Unknown test base: {}", base),
}
}
let context = builder.build();

View file

@ -1,5 +1,4 @@
{
"base": "npm",
"args": "check --all main.ts",
"output": "main.out"
}

View file

@ -1,5 +1,4 @@
{
"base": "npm",
"args": "run --allow-read main.js",
"output": "main.out"
}

View file

@ -1,5 +1,4 @@
{
"base": "npm",
"tempDir": true,
"args": "run --allow-read --node-modules-dir main.js",
"output": "main.out"

View file

@ -1,5 +1,4 @@
{
"base": "npm",
"steps": [{
"args": "run --allow-read --allow-env main.js",
"output": "main.out"