{
  "tests": {
    "prod_skips_dev_dependencies": {
      "tempDir": true,
      "steps": [
        {
          "args": "install --prod",
          "output": "install.out"
        },
        {
          // Verify the production dependency is installed
          "args": "run --cached-only main.js",
          "output": "main.out"
        },
        {
          // Verify the devDependency is NOT in node_modules
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@denotest/bin'); console.log('devDep exists'); } catch { console.log('devDep not found'); }"
          ],
          "output": "no_dev_dep.out"
        },
        {
          // Verify @types/* package IS still in node_modules (--prod alone doesn't strip types)
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@types/denotest__index-export-no-types'); console.log('@types exists'); } catch { console.log('@types not found'); }"
          ],
          "output": "has_types.out"
        }
      ]
    },
    "prod_skip_types_excludes_at_types": {
      "tempDir": true,
      "steps": [
        {
          "args": "install --prod --skip-types",
          "output": "install.out"
        },
        {
          // Verify the production dependency is installed
          "args": "run --cached-only main.js",
          "output": "main.out"
        },
        {
          // Verify @types/* package is NOT in node_modules
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@types/denotest__index-export-no-types'); console.log('@types exists'); } catch { console.log('@types not found'); }"
          ],
          "output": "no_types.out"
        }
      ]
    },
    "without_prod_installs_all": {
      "tempDir": true,
      "steps": [
        {
          "args": "install",
          "output": "[WILDCARD]"
        },
        {
          // Verify the devDependency IS in node_modules
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@denotest/bin'); console.log('devDep exists'); } catch { console.log('devDep not found'); }"
          ],
          "output": "has_dev_dep.out"
        },
        {
          // Verify @types/* package IS in node_modules
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@types/denotest__index-export-no-types'); console.log('@types exists'); } catch { console.log('@types not found'); }"
          ],
          "output": "has_types.out"
        }
      ]
    },
    "entrypoint_prod_skips_type_only_imports": {
      "tempDir": true,
      "steps": [
        {
          "args": "install --prod --entrypoint entrypoint.ts",
          "output": "install.out"
        },
        {
          // Verify the code dependency is installed
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@denotest/esm-basic'); console.log('codeDep exists'); } catch { console.log('codeDep not found'); }"
          ],
          "output": "has_code_dep.out"
        },
        {
          // Verify the type-only dependency is NOT installed
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@denotest/types'); console.log('typesDep exists'); } catch { console.log('typesDep not found'); }"
          ],
          "output": "no_types_dep.out"
        }
      ]
    },
    "entrypoint_without_prod_installs_type_imports": {
      "tempDir": true,
      "steps": [
        {
          "args": "install --entrypoint entrypoint.ts",
          "output": "[WILDCARD]"
        },
        {
          // Verify the type-only dependency IS installed
          "args": [
            "eval",
            "try { Deno.statSync('node_modules/@denotest/types'); console.log('typesDep exists'); } catch { console.log('typesDep not found'); }"
          ],
          "output": "has_types_dep.out"
        }
      ]
    }
  }
}
