-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update specs to be slightly more performant * Fix up all outstanding rubocop offenses * Interim rubocop update - all still passing * Update ruby workflows * Update CCK to latest version * Permit latest (and upcoming major), release for messages * Fix assetsloader to create less objects * Tidy up specs * WIP fix up shared context in tests * Tidy up rubocop offenses and make tests flow better * Add changelog * Remove private method now assets loader tests are working
- Loading branch information
Showing
13 changed files
with
117 additions
and
146 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,16 +20,13 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: "npm" | ||
cache-dependency-path: javascript/package-lock.json | ||
|
||
- run: npm install-ci-test | ||
working-directory: javascript | ||
|
||
- uses: cucumber/[email protected] | ||
with: | ||
npm-token: ${{ secrets.NPM_TOKEN }} | ||
|
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
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 |
---|---|---|
@@ -1,33 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
describe Cucumber::HTMLFormatter::AssetsLoader do | ||
subject(:assets_loader) { described_class.new } | ||
|
||
before do | ||
allow(File).to receive(:read).and_return('whatever content') | ||
end | ||
|
||
describe '#template' do | ||
it 'reads the content of assets/index.mustache.html' do | ||
expect(File).to receive(:read).with(/.*\/assets\/index\.mustache\.html$/) | ||
expect(File).to receive(:read).with(a_string_ending_with('assets/index.mustache.html')) | ||
|
||
assets_loader.template | ||
described_class.template | ||
end | ||
end | ||
|
||
describe '#css' do | ||
it 'reads the content of assets/main.css' do | ||
expect(File).to receive(:read).with(/.*\/assets\/main\.css$/) | ||
expect(File).to receive(:read).with(a_string_ending_with('assets/main.css')) | ||
|
||
assets_loader.css | ||
described_class.css | ||
end | ||
end | ||
|
||
describe '#script' do | ||
it 'reads the content of assets/main.js' do | ||
expect(File).to receive(:read).with(/.*\/assets\/main\.js$/) | ||
expect(File).to receive(:read).with(a_string_ending_with('assets/main.js')) | ||
|
||
assets_loader.script | ||
described_class.script | ||
end | ||
end | ||
end |
Oops, something went wrong.