mirror of
https://github.com/kremalicious/gatsby-plugin-matomo.git
synced 2024-12-22 17:23:23 +01:00
more config testing
This commit is contained in:
parent
f5a0180b98
commit
467a13b29a
@ -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/)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user