1
0
mirror of https://github.com/kremalicious/gatsby-plugin-matomo.git synced 2024-12-23 01:29:42 +01:00

more config testing

This commit is contained in:
Matthias Kretschmann 2020-02-15 15:43:34 +01:00
parent f5a0180b98
commit 467a13b29a
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -68,6 +68,30 @@ describe('gatsby-plugin-google-analytics', () => {
const result = JSON.stringify(setPostBodyComponents.mock.calls[0][0]) const result = JSON.stringify(setPostBodyComponents.mock.calls[0][0])
expect(result).toMatch(/TEST_SITE_URL/) expect(result).toMatch(/TEST_SITE_URL/)
}) })
it('sets requireConsent', () => {
const { setPostBodyComponents } = setup({
requireConsent: true
})
const result = JSON.stringify(setPostBodyComponents.mock.calls[0][0])
expect(result).toMatch(/requireConsent/)
})
it('sets disableCookies', () => {
const { setPostBodyComponents } = setup({
disableCookies: true
})
const result = JSON.stringify(setPostBodyComponents.mock.calls[0][0])
expect(result).toMatch(/disableCookies/)
})
it('sets localScript', () => {
const { setPostBodyComponents } = setup({
localScript: 'TEST_LOCAL_SCRIPT'
})
const result = JSON.stringify(setPostBodyComponents.mock.calls[0][0])
expect(result).toMatch(/TEST_LOCAL_SCRIPT/)
})
}) })
}) })
}) })