Skip to content

Commit

Permalink
chore: Revert test data to look less real.
Browse files Browse the repository at this point in the history
  • Loading branch information
yusinto committed Jan 25, 2024
1 parent 6a4604f commit 8e2382e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ describe('given a diagnostics manager', () => {
const { platform } = manager.createInitEvent();
expect(platform).toEqual({
name: 'The SDK Name',
osName: 'iOS',
osVersion: '17.17',
osArch: 'ARM64',
osName: 'An OS',
osVersion: '1.0.1',
osArch: 'An Arch',
nodeVersion: '42',
});
});
Expand Down
10 changes: 5 additions & 5 deletions packages/shared/mocks/src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const setupInfo = () => ({
platformData: jest.fn(
(): PlatformData => ({
os: {
name: 'iOS',
version: '17.17',
arch: 'ARM64',
name: 'An OS',
version: '1.0.1',
arch: 'An Arch',
},
name: 'The SDK Name',
additional: {
Expand All @@ -28,8 +28,8 @@ const setupInfo = () => ({
ld_device: {
key: '',
envAttributesVersion: '1.0',
os: { name: 'ios', version: '17', family: 'apple' },
manufacturer: 'apple',
os: { name: 'Another OS', version: '99', family: 'orange' },
manufacturer: 'coconut',
},
}),
),
Expand Down
4 changes: 2 additions & 2 deletions packages/shared/sdk-client/src/LDClientImpl.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const autoEnv = {
ld_device: {
key: 'random1',
envAttributesVersion: '1.0',
manufacturer: 'apple',
os: { family: 'apple', name: 'iOS', version: '17.17' },
manufacturer: 'coconut',
os: { name: 'An OS', version: '1.0.1', family: 'orange' },
},
};
let ldc: LDClientImpl;
Expand Down
32 changes: 10 additions & 22 deletions packages/shared/sdk-client/src/utils/addAutoEnv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ describe('addAutoEnv', () => {
ld_device: {
envAttributesVersion: '1.0',
key: 'test-device-key-1',
manufacturer: 'apple',
os: { family: 'apple', name: 'iOS', version: '17.17' },
manufacturer: 'coconut',
os: { name: 'An OS', version: '1.0.1', family: 'orange' },
},
user: { key: 'test-user-key-1', name: 'bob' },
});
Expand Down Expand Up @@ -81,8 +81,8 @@ describe('addAutoEnv', () => {
ld_device: {
envAttributesVersion: '1.0',
key: 'test-device-key-1',
manufacturer: 'apple',
os: { family: 'apple', name: 'iOS', version: '17.17' },
manufacturer: 'coconut',
os: { name: 'An OS', version: '1.0.1', family: 'orange' },
},
});
});
Expand Down Expand Up @@ -171,12 +171,8 @@ describe('addAutoEnv', () => {
expect(ldDevice).toEqual({
envAttributesVersion: '1.0',
key: 'test-device-key-1',
manufacturer: 'apple',
os: {
family: 'apple',
name: 'iOS',
version: '17.17',
},
manufacturer: 'coconut',
os: { name: 'An OS', version: '1.0.1', family: 'orange' },
});
});

Expand All @@ -190,12 +186,8 @@ describe('addAutoEnv', () => {
expect(ldDevice).toEqual({
envAttributesVersion: '1.0',
key: 'test-device-key-1',
manufacturer: 'apple',
os: {
family: 'apple',
name: 'ios',
version: '17',
},
manufacturer: 'coconut',
os: { name: 'Another OS', version: '99', family: 'orange' },
});
});

Expand All @@ -209,12 +201,8 @@ describe('addAutoEnv', () => {
expect(ldDevice).toEqual({
envAttributesVersion: '1.0',
key: 'test-device-key-1',
manufacturer: 'apple',
os: {
family: 'apple',
name: 'ios',
version: '17',
},
manufacturer: 'coconut',
os: { name: 'Another OS', version: '99', family: 'orange' },
});
});
});

0 comments on commit 8e2382e

Please sign in to comment.