Use Prettier JS (#5017)

* Adds prettier

* Run lint before tests
This commit is contained in:
Florent Vilmart
2018-09-01 13:58:06 -04:00
committed by GitHub
parent 189cd259ee
commit d83a0b6808
240 changed files with 41098 additions and 29020 deletions

View File

@@ -5,37 +5,45 @@ describe('ClientSDK', () => {
const clientSDKFromVersion = ClientSDK.fromString;
expect(clientSDKFromVersion('i1.1.1')).toEqual({
sdk: 'i',
version: '1.1.1'
version: '1.1.1',
});
expect(clientSDKFromVersion('i1')).toEqual({
sdk: 'i',
version: '1'
version: '1',
});
expect(clientSDKFromVersion('apple-tv1.13.0')).toEqual({
sdk: 'apple-tv',
version: '1.13.0'
version: '1.13.0',
});
expect(clientSDKFromVersion('js1.9.0')).toEqual({
sdk: 'js',
version: '1.9.0'
version: '1.9.0',
});
});
it('should properly sastisfy', () => {
expect(ClientSDK.compatible({
js: '>=1.9.0'
})("js1.9.0")).toBe(true);
expect(
ClientSDK.compatible({
js: '>=1.9.0',
})('js1.9.0')
).toBe(true);
expect(ClientSDK.compatible({
js: '>=1.9.0'
})("js2.0.0")).toBe(true);
expect(
ClientSDK.compatible({
js: '>=1.9.0',
})('js2.0.0')
).toBe(true);
expect(ClientSDK.compatible({
js: '>=1.9.0'
})("js1.8.0")).toBe(false);
expect(
ClientSDK.compatible({
js: '>=1.9.0',
})('js1.8.0')
).toBe(false);
expect(ClientSDK.compatible({
js: '>=1.9.0'
})(undefined)).toBe(true);
})
})
expect(
ClientSDK.compatible({
js: '>=1.9.0',
})(undefined)
).toBe(true);
});
});