This is content for accordion 1 of 2
' + + 'This content contains a link
' + + 'diff --git a/CHANGELOG.md b/CHANGELOG.md index b93bdb8259..b42dc58b83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ## Unreleased * Rescope Brexit CTA to en/cy locale only ([PR #1984](https://github.com/alphagov/govuk_publishing_components/pull/1984)) +* Add js tests for accordion component ([PR #1977](https://github.com/alphagov/govuk_publishing_components/pull/1977)) ## 24.6.1 diff --git a/spec/javascripts/components/accordion-spec.js b/spec/javascripts/components/accordion-spec.js new file mode 100644 index 0000000000..33f0581fd7 --- /dev/null +++ b/spec/javascripts/components/accordion-spec.js @@ -0,0 +1,113 @@ +/* eslint-env jasmine, jquery */ +/* global GOVUK */ + +describe('An accordion component', function () { + 'use strict' + + var element + var container + + beforeEach(function () { + container = document.createElement('div') + container.innerHTML = + '
This is content for accordion 1 of 2
' + + 'This content contains a link
' + + '