{
  "tests": {
    "install_sets_up_node_modules": {
      "tempDir": true,
      "steps": [
        {
          "args": "install",
          "output": "install.out"
        },
        {
          // ensure deps are actually cached
          "args": "run --cached-only main.js",
          "output": ""
        },
        {
          // check for lockfile
          "args": [
            "eval",
            "console.log(Deno.readTextFileSync('./deno.lock').trim())"
          ],
          "output": "deno.lock.out"
        }
      ]
    },
    "install_sets_up_node_modules_with_lockfile": {
      "tempDir": true,
      "steps": [
        {
          "args": "install",
          "output": "install.out"
        },
        {
          // check for lockfile
          "args": [
            "eval",
            "console.log(Deno.readTextFileSync('./deno.lock').trim())"
          ],
          "output": "deno.lock.out"
        },
        {
          // remove the lockfile
          "args": [
            "eval",
            "Deno.removeSync('node_modules', {recursive: true});"
          ],
          "output": ""
        },
        {
          // install, this time should use the lockfile
          "args": "install",
          "output": "install_lockfile.out"
        },
        {
          // make sure we created the node_modules dir
          "args": ["eval", "Deno.statSync('node_modules')"],
          "output": ""
        }
      ]
    }
  }
}
