Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/core/bucketer/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('excluding groups', () => {
vi.clearAllMocks();

setLogSpy(mockLogger);
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Expand Down Expand Up @@ -125,7 +125,7 @@ describe('including groups: random', () => {
vi.clearAllMocks();

setLogSpy(mockLogger);
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
bucketerParams = {
Expand Down Expand Up @@ -231,7 +231,7 @@ describe('including groups: overlapping', () => {
vi.clearAllMocks();

setLogSpy(mockLogger);
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
bucketerParams = {
Expand Down Expand Up @@ -276,7 +276,7 @@ describe('bucket value falls into empty traffic allocation ranges', () => {

beforeEach(() => {
setLogSpy(mockLogger);
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
bucketerParams = {
Expand Down Expand Up @@ -326,7 +326,7 @@ describe('traffic allocation has invalid variation ids', () => {

beforeEach(() => {
setLogSpy(mockLogger);
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
bucketerParams = {
Expand Down Expand Up @@ -369,7 +369,7 @@ describe('testBucketWithBucketingId', () => {
let bucketerParams: BucketerParams;

beforeEach(() => {
const configObj = projectConfig.createProjectConfig(cloneDeep(testData));
const configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
bucketerParams = {
Expand Down
10 changes: 5 additions & 5 deletions lib/core/bucketer/index.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('lib/core/bucketer', function () {

describe('return values for bucketing (excluding groups)', function () {
beforeEach(function () {
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
bucketerParams = {
experimentId: configObj.experiments[0].id,
experimentKey: configObj.experiments[0].key,
Expand Down Expand Up @@ -107,7 +107,7 @@ describe('lib/core/bucketer', function () {
describe('return values for bucketing (including groups)', function () {
var bucketerStub;
beforeEach(function () {
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
bucketerParams = {
experimentId: configObj.experiments[0].id,
experimentKey: configObj.experiments[0].key,
Expand Down Expand Up @@ -255,7 +255,7 @@ describe('lib/core/bucketer', function () {

describe('when the bucket value falls into empty traffic allocation ranges', function () {
beforeEach(function () {
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
bucketerParams = {
experimentId: configObj.experiments[0].id,
experimentKey: configObj.experiments[0].key,
Expand Down Expand Up @@ -303,7 +303,7 @@ describe('lib/core/bucketer', function () {

describe('when the traffic allocation has invalid variation ids', function () {
beforeEach(function () {
configObj = projectConfig.createProjectConfig(cloneDeep(testData));
configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
bucketerParams = {
experimentId: configObj.experiments[0].id,
experimentKey: configObj.experiments[0].key,
Expand Down Expand Up @@ -364,7 +364,7 @@ describe('lib/core/bucketer', function () {
});

beforeEach(function () {
var configObj = projectConfig.createProjectConfig(cloneDeep(testData));
var configObj = projectConfig.createProjectConfig(JSON.stringify(testData));
bucketerParams = {
trafficAllocationConfig: configObj.experiments[0].trafficAllocation,
variationIdMap: configObj.variationIdMap,
Expand Down
Loading
Loading