diff --git a/.changeset/khaki-mayflies-punch.md b/.changeset/khaki-mayflies-punch.md new file mode 100644 index 000000000..2a9da8977 --- /dev/null +++ b/.changeset/khaki-mayflies-punch.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': minor +--- + +Adds a new load option `disableAutoISOConversions` that turns off converting ISO strings in event fields to Dates for integrations. diff --git a/packages/browser/src/browser/__tests__/integration.test.ts b/packages/browser/src/browser/__tests__/integration.test.ts index b03740945..1d582f340 100644 --- a/packages/browser/src/browser/__tests__/integration.test.ts +++ b/packages/browser/src/browser/__tests__/integration.test.ts @@ -2,7 +2,7 @@ import { Context } from '@/core/context' import { Plugin } from '@/core/plugin' import { JSDOM } from 'jsdom' -import { Analytics } from '../../core/analytics' +import { Analytics, InitOptions } from '../../core/analytics' import { LegacyDestination } from '../../plugins/ajs-destination' import { PersistedPriorityQueue } from '../../lib/priority-queue/persisted' // @ts-ignore loadLegacySettings mocked dependency is accused as unused @@ -998,3 +998,137 @@ describe('.Integrations', () => { `) }) }) + +describe('Options', () => { + beforeEach(async () => { + jest.restoreAllMocks() + jest.resetAllMocks() + + const html = ` + +
+ + + + +