Skip to content

Commit

Permalink
Add tests for pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
skryukov committed Aug 11, 2024
1 parent e54c2e1 commit d490fb2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ jobs:
node-version: 20.x
- name: Install yarn
run: npm install -g yarn
- name: Install pnpm
run: npm install -g pnpm
- name: Run tests
run: bundle exec rspec
25 changes: 25 additions & 0 deletions spec/lib/generators/install/install_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@

expect_example_page_for(:react)
expect_packages_for(:react)
expect(destination_root).to(have_structure do
file("yarn.lock")
end)
end
end

Expand All @@ -110,6 +113,25 @@

expect_example_page_for(:react)
expect_packages_for(:react)
expect(destination_root).to(have_structure do
file("package-lock.json")
end)
end
end

context "with pnpm" do
let(:args) { super() + %w[--package-manager=pnpm] }

before { prepare_application }

it "installs the Inertia adapter" do
expect { generator }.not_to raise_error

expect_example_page_for(:react)
expect_packages_for(:react)
expect(destination_root).to(have_structure do
file("pnpm-lock.yaml")
end)
end
end

Expand All @@ -123,6 +145,9 @@

expect_example_page_for(:react)
expect_packages_for(:react)
expect(destination_root).to(have_structure do
file("bun.lockb")
end)
end
end

Expand Down

0 comments on commit d490fb2

Please sign in to comment.