This is content for accordion 1 of 2
' + + 'This content contains a link
' + + 'diff --git a/CHANGELOG.md b/CHANGELOG.md index c30cb3ef6b..fb75d4442a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ useful summary for people upgrading their application, not a replication of the commit log. +## Unreleased + +* Add js tests for accordion component ([PR #1977](https://github.com/alphagov/govuk_publishing_components/pull/1977)) + ## 24.6.0 * Remove title attribute from summary list ([PR #1973](https://github.com/alphagov/govuk_publishing_components/pull/1973)) diff --git a/spec/javascripts/components/accordion-spec.js b/spec/javascripts/components/accordion-spec.js new file mode 100644 index 0000000000..187d2d9222 --- /dev/null +++ b/spec/javascripts/components/accordion-spec.js @@ -0,0 +1,108 @@ +/* eslint-env jasmine, jquery */ +/* global GOVUK */ + +describe('An accordion component', function () { + 'use strict' + + var element + + beforeEach(function () { + var container = document.createElement('div') + container.innerHTML = + '
This is content for accordion 1 of 2
' + + 'This content contains a link
' + + '