-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate empty
yarn.lock
using Yarn on Heroku
Closes [#538]. Generate an empty `yarn.lock` so that Heroku understands that the application's deployment target requires `yarn`. [#538]: #538
- Loading branch information
1 parent
1089254
commit 5ed3bc7
Showing
7 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require "rails/generators" | ||
require "generator_spec" | ||
require "generators/ember/heroku/heroku_generator" | ||
|
||
describe EmberCli::HerokuGenerator, type: :generator do | ||
destination Rails.root.join("tmp", "generator_test_output") | ||
|
||
before :all do | ||
prepare_destination | ||
FileUtils.touch(destination_root.join("Gemfile")) | ||
end | ||
|
||
context "without yarn enabled" do | ||
it "does not generate a root-level yarn.lock" do | ||
EmberCli.configure do |c| | ||
c.app "my-app", yarn: false | ||
end | ||
|
||
run_generator | ||
|
||
expect(destination_root).to have_structure { | ||
no_file "yarn.lock" | ||
} | ||
end | ||
end | ||
|
||
context "with yarn enabled" do | ||
it "generates a root-level yarn.lock" do | ||
EmberCli.configure do |c| | ||
c.app "my-app", yarn: true | ||
end | ||
|
||
run_generator | ||
|
||
expect(destination_root).to have_structure { | ||
file "yarn.lock" | ||
} | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters