Skip to content

Commit

Permalink
Add tests for pnp nonzero install
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlewis committed Feb 3, 2022
1 parent a63e1e3 commit 075c31a
Show file tree
Hide file tree
Showing 7 changed files with 1,275 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/ci/yarn_pnp_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@
expect(successful_body(app).strip).to eq("Hello from yarn-pnp-zero-install")
end
end

it "nonzero-install should deploy successfully" do
app = Hatchet::Runner.new(
"spec/fixtures/repos/yarn-pnp-nonzero-install",
config: { "NODE_MODULES_CACHE": "false" }
)
app.deploy do |app|
expect(successful_body(app).strip).to eq("Hello from yarn-pnp-nonzero-install")
end
end
end

7 changes: 7 additions & 0 deletions spec/fixtures/repos/yarn-pnp-nonzero-install/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions spec/fixtures/repos/yarn-pnp-nonzero-install/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-3.1.1.cjs
11 changes: 11 additions & 0 deletions spec/fixtures/repos/yarn-pnp-nonzero-install/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require("express");
const app = express();
const port = process.env["PORT"] || 3000;

app.get("/", (_req,res) => {
res.send("Hello from yarn-pnp-nonzero-install");
});

app.listen(port, () => {
console.log(`yarn-pnp-nonzero-install listening on ${port}`);
});
13 changes: 13 additions & 0 deletions spec/fixtures/repos/yarn-pnp-nonzero-install/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "yarn-pnp-nonzero-install",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "yarn node index.js"
},
"dependencies": {
"express": "^4.17.2"
},
"packageManager": "yarn@3.1.1"
}
Loading

0 comments on commit 075c31a

Please sign in to comment.