@squiz/db-lib 1.2.1-alpha.98 → 1.2.1-alpha.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/index.d.ts +0 -7
  3. package/lib/index.js +0 -114
  4. package/lib/index.js.map +4 -4
  5. package/package.json +4 -5
  6. package/src/index.ts +0 -11
  7. package/tsconfig.tsbuildinfo +1 -1
  8. package/lib/assertions/assertAssign.d.ts +0 -4
  9. package/lib/assertions/assertAssign.spec.d.ts +0 -1
  10. package/lib/assertions/assertAssignWithDefaultUndefinedValue.d.ts +0 -4
  11. package/lib/assertions/assertAssignWithDefaultUndefinedValue.spec.d.ts +0 -1
  12. package/lib/assertions/assertIsDefined.d.ts +0 -1
  13. package/lib/assertions/assertIsDefined.spec.d.ts +0 -1
  14. package/lib/assertions/assertIsMapOfStringString.d.ts +0 -3
  15. package/lib/assertions/assertIsMapOfStringString.spec.d.ts +0 -1
  16. package/lib/assertions/assertIsNotAnEmptyString.d.ts +0 -1
  17. package/lib/assertions/assertIsNotAnEmptyString.spec.d.ts +0 -1
  18. package/lib/assertions/assertIsObject.d.ts +0 -1
  19. package/lib/assertions/assertIsObject.spec.d.ts +0 -1
  20. package/lib/assertions/assertIsString.d.ts +0 -1
  21. package/lib/assertions/assertIsString.spec.d.ts +0 -1
  22. package/src/assertions/assertAssign.spec.ts +0 -18
  23. package/src/assertions/assertAssign.ts +0 -22
  24. package/src/assertions/assertAssignWithDefaultUndefinedValue.spec.ts +0 -31
  25. package/src/assertions/assertAssignWithDefaultUndefinedValue.ts +0 -17
  26. package/src/assertions/assertIsDefined.spec.ts +0 -19
  27. package/src/assertions/assertIsDefined.ts +0 -7
  28. package/src/assertions/assertIsMapOfStringString.spec.ts +0 -23
  29. package/src/assertions/assertIsMapOfStringString.ts +0 -29
  30. package/src/assertions/assertIsNotAnEmptyString.spec.ts +0 -25
  31. package/src/assertions/assertIsNotAnEmptyString.ts +0 -17
  32. package/src/assertions/assertIsObject.spec.ts +0 -17
  33. package/src/assertions/assertIsObject.ts +0 -11
  34. package/src/assertions/assertIsString.spec.ts +0 -16
  35. package/src/assertions/assertIsString.ts +0 -11
@@ -1,16 +0,0 @@
1
- import { assertIsString } from './assertIsString';
2
-
3
- describe('assertIsString', () => {
4
- it('should not throw if input is a string', () => {
5
- expect(assertIsString('hello')).toBeUndefined();
6
- });
7
-
8
- it('should not throw if input is not a string', () => {
9
- expect(() => assertIsString(undefined)).toThrowErrorMatchingInlineSnapshot(`"value is not a string"`);
10
- expect(() => assertIsString(null)).toThrowErrorMatchingInlineSnapshot(`"value is not a string"`);
11
- expect(() => assertIsString(123)).toThrowErrorMatchingInlineSnapshot(`"value is not a string"`);
12
- expect(() => assertIsString([])).toThrowErrorMatchingInlineSnapshot(`"value is not a string"`);
13
- expect(() => assertIsString(NaN)).toThrowErrorMatchingInlineSnapshot(`"value is not a string"`);
14
- expect(() => assertIsString(Infinity)).toThrowErrorMatchingInlineSnapshot(`"value is not a string"`);
15
- });
16
- });
@@ -1,11 +0,0 @@
1
- import { AssertionError } from 'assert';
2
-
3
- export function assertIsString(val: any): asserts val is string {
4
- if (typeof val !== 'string') {
5
- throw new AssertionError({
6
- actual: val,
7
- expected: 'string',
8
- message: 'value is not a string',
9
- });
10
- }
11
- }