Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
kr8n3r committed Nov 1, 2019
1 parent 7ae3c29 commit 311d2ad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/javascripts/analytics/static-analytics-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ describe("GOVUK.StaticAnalytics", function() {
expect(pageViewObject.dimension42).toEqual('name-of-test:name-of-ab-bucket');
expect(pageViewObject.dimension48).toEqual('name-of-other-test:name-of-other-ab-bucket');
});
it('sets the spelling suggestion as dimension 81', function() {
$('head').append('\
<meta name="govuk:spelling-suggestion" content="driving">\
');

analytics = new GOVUK.StaticAnalytics({universalId: 'universal-id'});
pageViewObject = getPageViewObject();

expect(pageViewObject.dimension81).toEqual('driving');
});

it('ignores A/B meta tags with invalid dimensions', function () {
$('head').append('\
Expand Down

0 comments on commit 311d2ad

Please sign in to comment.