-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): convert to named exports
- Loading branch information
1 parent
15b22dd
commit 4817738
Showing
88 changed files
with
334 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
export { default as after } from './toBeAfter'; | ||
export { default as arrayOfBooleans } from './toBeArrayOfBooleans'; | ||
export { default as arrayOfNumbers } from './toBeArrayOfNumbers'; | ||
export { default as arrayOfObjects } from './toBeArrayOfObjects'; | ||
export { default as arrayOfSize } from './toBeArrayOfSize'; | ||
export { default as arrayOfStrings } from './toBeArrayOfStrings'; | ||
export { default as before } from './toBeBefore'; | ||
export { default as calculable } from './toBeCalculable'; | ||
export { default as emptyArray } from './toBeEmptyArray'; | ||
export { default as emptyObject } from './toBeEmptyObject'; | ||
export { default as endingWith } from './toEndWith'; | ||
export { default as evenNumber } from './toBeEvenNumber'; | ||
export { default as greaterThanOrEqualTo } from './toBeGreaterThanOrEqualTo'; | ||
export { default as iso8601 } from './toBeIso8601'; | ||
export { default as jsonString } from './toBeJsonString'; | ||
export { default as lessThanOrEqualTo } from './toBeLessThanOrEqualTo'; | ||
export { default as longerThan } from './toBeLongerThan'; | ||
export { default as nonEmptyArray } from './toBeNonEmptyArray'; | ||
export { default as nonEmptyObject } from './toBeNonEmptyObject'; | ||
export { default as nonEmptyString } from './toBeNonEmptyString'; | ||
export { default as oddNumber } from './toBeOddNumber'; | ||
export { default as regExp } from './toBeRegExp'; | ||
export { default as sameLengthAs } from './toBeSameLengthAs'; | ||
export { default as shorterThan } from './toBeShorterThan'; | ||
export { default as startingWith } from './toStartWith'; | ||
export { default as whitespace } from './toBeWhitespace'; | ||
export { default as wholeNumber } from './toBeWholeNumber'; | ||
export { default as withinRange } from './toBeWithinRange'; | ||
export { toBeAfter as after } from './toBeAfter'; | ||
export { toBeArrayOfBooleans as arrayOfBooleans } from './toBeArrayOfBooleans'; | ||
export { toBeArrayOfNumbers as arrayOfNumbers } from './toBeArrayOfNumbers'; | ||
export { toBeArrayOfObjects as arrayOfObjects } from './toBeArrayOfObjects'; | ||
export { toBeArrayOfSize as arrayOfSize } from './toBeArrayOfSize'; | ||
export { toBeArrayOfStrings as arrayOfStrings } from './toBeArrayOfStrings'; | ||
export { toBeBefore as before } from './toBeBefore'; | ||
export { toBeCalculable as calculable } from './toBeCalculable'; | ||
export { toBeEmptyArray as emptyArray } from './toBeEmptyArray'; | ||
export { toBeEmptyObject as emptyObject } from './toBeEmptyObject'; | ||
export { toEndWith as endingWith } from './toEndWith'; | ||
export { toBeEvenNumber as evenNumber } from './toBeEvenNumber'; | ||
export { | ||
toBeGreaterThanOrEqualTo as greaterThanOrEqualTo | ||
} from './toBeGreaterThanOrEqualTo'; | ||
export { toBeIso8601 as iso8601 } from './toBeIso8601'; | ||
export { toBeJsonString as jsonString } from './toBeJsonString'; | ||
export { | ||
toBeLessThanOrEqualTo as lessThanOrEqualTo | ||
} from './toBeLessThanOrEqualTo'; | ||
export { toBeLongerThan as longerThan } from './toBeLongerThan'; | ||
export { toBeNonEmptyArray as nonEmptyArray } from './toBeNonEmptyArray'; | ||
export { toBeNonEmptyObject as nonEmptyObject } from './toBeNonEmptyObject'; | ||
export { toBeNonEmptyString as nonEmptyString } from './toBeNonEmptyString'; | ||
export { toBeOddNumber as oddNumber } from './toBeOddNumber'; | ||
export { toBeRegExp as regExp } from './toBeRegExp'; | ||
export { toBeSameLengthAs as sameLengthAs } from './toBeSameLengthAs'; | ||
export { toBeShorterThan as shorterThan } from './toBeShorterThan'; | ||
export { toStartWith as startingWith } from './toStartWith'; | ||
export { toBeWhitespace as whitespace } from './toBeWhitespace'; | ||
export { toBeWholeNumber as wholeNumber } from './toBeWholeNumber'; | ||
export { toBeWithinRange as withinRange } from './toBeWithinRange'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import reduce from './reduce'; | ||
import { reduce } from './reduce'; | ||
|
||
export default (object) => | ||
reduce(object, (keys, value, key) => keys.concat(key), []); | ||
export const keys = (object) => | ||
reduce(object, (array, value, key) => array.concat(key), []); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import is from './is'; | ||
import { is } from './is'; | ||
|
||
export default (toBeX) => (key, actual) => | ||
export const memberMatcherFor = (toBeX) => (key, actual) => | ||
is.Object(actual) && toBeX(actual[key]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,79 @@ | ||
export { default as toBeAfter } from './toBeAfter'; | ||
export { default as toBeArray } from './toBeArray'; | ||
export { default as toBeArrayOfBooleans } from './toBeArrayOfBooleans'; | ||
export { default as toBeArrayOfNumbers } from './toBeArrayOfNumbers'; | ||
export { default as toBeArrayOfObjects } from './toBeArrayOfObjects'; | ||
export { default as toBeArrayOfSize } from './toBeArrayOfSize'; | ||
export { default as toBeArrayOfStrings } from './toBeArrayOfStrings'; | ||
export { default as toBeBefore } from './toBeBefore'; | ||
export { default as toBeBoolean } from './toBeBoolean'; | ||
export { default as toBeCalculable } from './toBeCalculable'; | ||
export { default as toBeDate } from './toBeDate'; | ||
export { default as toBeEmptyArray } from './toBeEmptyArray'; | ||
export { default as toBeEmptyObject } from './toBeEmptyObject'; | ||
export { default as toBeEmptyString } from './toBeEmptyString'; | ||
export { default as toBeEvenNumber } from './toBeEvenNumber'; | ||
export { default as toBeFalse } from './toBeFalse'; | ||
export { default as toBeFunction } from './toBeFunction'; | ||
export { | ||
default as toBeGreaterThanOrEqualTo | ||
} from './toBeGreaterThanOrEqualTo'; | ||
export { default as toBeHtmlString } from './toBeHtmlString'; | ||
export { default as toBeIso8601 } from './toBeIso8601'; | ||
export { default as toBeJsonString } from './toBeJsonString'; | ||
export { default as toBeLessThanOrEqualTo } from './toBeLessThanOrEqualTo'; | ||
export { default as toBeLongerThan } from './toBeLongerThan'; | ||
export { default as toBeNear } from './toBeNear'; | ||
export { default as toBeNonEmptyArray } from './toBeNonEmptyArray'; | ||
export { default as toBeNonEmptyObject } from './toBeNonEmptyObject'; | ||
export { default as toBeNonEmptyString } from './toBeNonEmptyString'; | ||
export { default as toBeNumber } from './toBeNumber'; | ||
export { default as toBeObject } from './toBeObject'; | ||
export { default as toBeOddNumber } from './toBeOddNumber'; | ||
export { default as toBeRegExp } from './toBeRegExp'; | ||
export { default as toBeSameLengthAs } from './toBeSameLengthAs'; | ||
export { default as toBeShorterThan } from './toBeShorterThan'; | ||
export { default as toBeString } from './toBeString'; | ||
export { default as toBeTrue } from './toBeTrue'; | ||
export { default as toBeValidDate } from './toBeValidDate'; | ||
export { default as toBeWhitespace } from './toBeWhitespace'; | ||
export { default as toBeWholeNumber } from './toBeWholeNumber'; | ||
export { default as toBeWithinRange } from './toBeWithinRange'; | ||
export { default as toEndWith } from './toEndWith'; | ||
export { default as toHaveArray } from './toHaveArray'; | ||
export { default as toHaveArrayOfBooleans } from './toHaveArrayOfBooleans'; | ||
export { default as toHaveArrayOfNumbers } from './toHaveArrayOfNumbers'; | ||
export { default as toHaveArrayOfObjects } from './toHaveArrayOfObjects'; | ||
export { default as toHaveArrayOfSize } from './toHaveArrayOfSize'; | ||
export { default as toHaveArrayOfStrings } from './toHaveArrayOfStrings'; | ||
export { default as toHaveBoolean } from './toHaveBoolean'; | ||
export { default as toHaveCalculable } from './toHaveCalculable'; | ||
export { default as toHaveDate } from './toHaveDate'; | ||
export { default as toHaveDateAfter } from './toHaveDateAfter'; | ||
export { default as toHaveDateBefore } from './toHaveDateBefore'; | ||
export { default as toHaveEmptyArray } from './toHaveEmptyArray'; | ||
export { default as toHaveEmptyObject } from './toHaveEmptyObject'; | ||
export { default as toHaveEmptyString } from './toHaveEmptyString'; | ||
export { default as toHaveEvenNumber } from './toHaveEvenNumber'; | ||
export { default as toHaveFalse } from './toHaveFalse'; | ||
export { default as toHaveHtmlString } from './toHaveHtmlString'; | ||
export { default as toHaveIso8601 } from './toHaveIso8601'; | ||
export { default as toHaveJsonString } from './toHaveJsonString'; | ||
export { default as toHaveMember } from './toHaveMember'; | ||
export { default as toHaveMethod } from './toHaveMethod'; | ||
export { default as toHaveNonEmptyArray } from './toHaveNonEmptyArray'; | ||
export { default as toHaveNonEmptyObject } from './toHaveNonEmptyObject'; | ||
export { default as toHaveNonEmptyString } from './toHaveNonEmptyString'; | ||
export { default as toHaveNumber } from './toHaveNumber'; | ||
export { default as toHaveNumberWithinRange } from './toHaveNumberWithinRange'; | ||
export { default as toHaveObject } from './toHaveObject'; | ||
export { default as toHaveOddNumber } from './toHaveOddNumber'; | ||
export { default as toHaveString } from './toHaveString'; | ||
export { default as toHaveStringLongerThan } from './toHaveStringLongerThan'; | ||
export { | ||
default as toHaveStringSameLengthAs | ||
} from './toHaveStringSameLengthAs'; | ||
export { default as toHaveStringShorterThan } from './toHaveStringShorterThan'; | ||
export { default as toHaveTrue } from './toHaveTrue'; | ||
export { default as toHaveUndefined } from './toHaveUndefined'; | ||
export { default as toHaveWhitespaceString } from './toHaveWhitespaceString'; | ||
export { default as toHaveWholeNumber } from './toHaveWholeNumber'; | ||
export { default as toStartWith } from './toStartWith'; | ||
export { default as toThrowAnyError } from './toThrowAnyError'; | ||
export { default as toThrowErrorOfType } from './toThrowErrorOfType'; | ||
export { toBeAfter } from './toBeAfter'; | ||
export { toBeArray } from './toBeArray'; | ||
export { toBeArrayOfBooleans } from './toBeArrayOfBooleans'; | ||
export { toBeArrayOfNumbers } from './toBeArrayOfNumbers'; | ||
export { toBeArrayOfObjects } from './toBeArrayOfObjects'; | ||
export { toBeArrayOfSize } from './toBeArrayOfSize'; | ||
export { toBeArrayOfStrings } from './toBeArrayOfStrings'; | ||
export { toBeBefore } from './toBeBefore'; | ||
export { toBeBoolean } from './toBeBoolean'; | ||
export { toBeCalculable } from './toBeCalculable'; | ||
export { toBeDate } from './toBeDate'; | ||
export { toBeEmptyArray } from './toBeEmptyArray'; | ||
export { toBeEmptyObject } from './toBeEmptyObject'; | ||
export { toBeEmptyString } from './toBeEmptyString'; | ||
export { toBeEvenNumber } from './toBeEvenNumber'; | ||
export { toBeFalse } from './toBeFalse'; | ||
export { toBeFunction } from './toBeFunction'; | ||
export { toBeGreaterThanOrEqualTo } from './toBeGreaterThanOrEqualTo'; | ||
export { toBeHtmlString } from './toBeHtmlString'; | ||
export { toBeIso8601 } from './toBeIso8601'; | ||
export { toBeJsonString } from './toBeJsonString'; | ||
export { toBeLessThanOrEqualTo } from './toBeLessThanOrEqualTo'; | ||
export { toBeLongerThan } from './toBeLongerThan'; | ||
export { toBeNear } from './toBeNear'; | ||
export { toBeNonEmptyArray } from './toBeNonEmptyArray'; | ||
export { toBeNonEmptyObject } from './toBeNonEmptyObject'; | ||
export { toBeNonEmptyString } from './toBeNonEmptyString'; | ||
export { toBeNumber } from './toBeNumber'; | ||
export { toBeObject } from './toBeObject'; | ||
export { toBeOddNumber } from './toBeOddNumber'; | ||
export { toBeRegExp } from './toBeRegExp'; | ||
export { toBeSameLengthAs } from './toBeSameLengthAs'; | ||
export { toBeShorterThan } from './toBeShorterThan'; | ||
export { toBeString } from './toBeString'; | ||
export { toBeTrue } from './toBeTrue'; | ||
export { toBeValidDate } from './toBeValidDate'; | ||
export { toBeWhitespace } from './toBeWhitespace'; | ||
export { toBeWholeNumber } from './toBeWholeNumber'; | ||
export { toBeWithinRange } from './toBeWithinRange'; | ||
export { toEndWith } from './toEndWith'; | ||
export { toHaveArray } from './toHaveArray'; | ||
export { toHaveArrayOfBooleans } from './toHaveArrayOfBooleans'; | ||
export { toHaveArrayOfNumbers } from './toHaveArrayOfNumbers'; | ||
export { toHaveArrayOfObjects } from './toHaveArrayOfObjects'; | ||
export { toHaveArrayOfSize } from './toHaveArrayOfSize'; | ||
export { toHaveArrayOfStrings } from './toHaveArrayOfStrings'; | ||
export { toHaveBoolean } from './toHaveBoolean'; | ||
export { toHaveCalculable } from './toHaveCalculable'; | ||
export { toHaveDate } from './toHaveDate'; | ||
export { toHaveDateAfter } from './toHaveDateAfter'; | ||
export { toHaveDateBefore } from './toHaveDateBefore'; | ||
export { toHaveEmptyArray } from './toHaveEmptyArray'; | ||
export { toHaveEmptyObject } from './toHaveEmptyObject'; | ||
export { toHaveEmptyString } from './toHaveEmptyString'; | ||
export { toHaveEvenNumber } from './toHaveEvenNumber'; | ||
export { toHaveFalse } from './toHaveFalse'; | ||
export { toHaveHtmlString } from './toHaveHtmlString'; | ||
export { toHaveIso8601 } from './toHaveIso8601'; | ||
export { toHaveJsonString } from './toHaveJsonString'; | ||
export { toHaveMember } from './toHaveMember'; | ||
export { toHaveMethod } from './toHaveMethod'; | ||
export { toHaveNonEmptyArray } from './toHaveNonEmptyArray'; | ||
export { toHaveNonEmptyObject } from './toHaveNonEmptyObject'; | ||
export { toHaveNonEmptyString } from './toHaveNonEmptyString'; | ||
export { toHaveNumber } from './toHaveNumber'; | ||
export { toHaveNumberWithinRange } from './toHaveNumberWithinRange'; | ||
export { toHaveObject } from './toHaveObject'; | ||
export { toHaveOddNumber } from './toHaveOddNumber'; | ||
export { toHaveString } from './toHaveString'; | ||
export { toHaveStringLongerThan } from './toHaveStringLongerThan'; | ||
export { toHaveStringSameLengthAs } from './toHaveStringSameLengthAs'; | ||
export { toHaveStringShorterThan } from './toHaveStringShorterThan'; | ||
export { toHaveTrue } from './toHaveTrue'; | ||
export { toHaveUndefined } from './toHaveUndefined'; | ||
export { toHaveWhitespaceString } from './toHaveWhitespaceString'; | ||
export { toHaveWholeNumber } from './toHaveWholeNumber'; | ||
export { toStartWith } from './toStartWith'; | ||
export { toThrowAnyError } from './toThrowAnyError'; | ||
export { toThrowErrorOfType } from './toThrowErrorOfType'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import toBeBefore from './toBeBefore'; | ||
export default (otherDate, actual) => toBeBefore(actual, otherDate); | ||
import { toBeBefore } from './toBeBefore'; | ||
export const toBeAfter = (otherDate, actual) => toBeBefore(actual, otherDate); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import is from './lib/is'; | ||
export default is.Array; | ||
import { is } from './lib/is'; | ||
export const toBeArray = is.Array; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import every from './lib/every'; | ||
import toBeArray from './toBeArray'; | ||
import toBeBoolean from './toBeBoolean'; | ||
export default (actual) => toBeArray(actual) && every(actual, toBeBoolean); | ||
import { every } from './lib/every'; | ||
import { toBeArray } from './toBeArray'; | ||
import { toBeBoolean } from './toBeBoolean'; | ||
export const toBeArrayOfBooleans = (actual) => | ||
toBeArray(actual) && every(actual, toBeBoolean); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import every from './lib/every'; | ||
import toBeArray from './toBeArray'; | ||
import toBeNumber from './toBeNumber'; | ||
export default (actual) => toBeArray(actual) && every(actual, toBeNumber); | ||
import { every } from './lib/every'; | ||
import { toBeArray } from './toBeArray'; | ||
import { toBeNumber } from './toBeNumber'; | ||
export const toBeArrayOfNumbers = (actual) => | ||
toBeArray(actual) && every(actual, toBeNumber); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import every from './lib/every'; | ||
import toBeArray from './toBeArray'; | ||
import toBeObject from './toBeObject'; | ||
export default (actual) => toBeArray(actual) && every(actual, toBeObject); | ||
import { every } from './lib/every'; | ||
import { toBeArray } from './toBeArray'; | ||
import { toBeObject } from './toBeObject'; | ||
export const toBeArrayOfObjects = (actual) => | ||
toBeArray(actual) && every(actual, toBeObject); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import toBeArray from './toBeArray'; | ||
export default (size, actual) => toBeArray(actual) && actual.length === size; | ||
import { toBeArray } from './toBeArray'; | ||
export const toBeArrayOfSize = (size, actual) => | ||
toBeArray(actual) && actual.length === size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import every from './lib/every'; | ||
import toBeArray from './toBeArray'; | ||
import toBeString from './toBeString'; | ||
export default (actual) => toBeArray(actual) && every(actual, toBeString); | ||
import { every } from './lib/every'; | ||
import { toBeArray } from './toBeArray'; | ||
import { toBeString } from './toBeString'; | ||
export const toBeArrayOfStrings = (actual) => | ||
toBeArray(actual) && every(actual, toBeString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import toBeDate from './toBeDate'; | ||
import { toBeDate } from './toBeDate'; | ||
|
||
export default (otherDate, actual) => | ||
export const toBeBefore = (otherDate, actual) => | ||
toBeDate(actual) && | ||
toBeDate(otherDate) && | ||
actual.getTime() < otherDate.getTime(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import is from './lib/is'; | ||
export default is.Boolean; | ||
import { is } from './lib/is'; | ||
export const toBeBoolean = is.Boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
export default toBeCalculable; | ||
|
||
// Assert subject can be used in Mathemetic calculations despite not being a | ||
// Number, for example `"1" * "2" === 2` whereas `"wut?" * 2 === NaN`. | ||
function toBeCalculable(actual) { | ||
export function toBeCalculable(actual) { | ||
return !isNaN(actual * 2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import is from './lib/is'; | ||
export default is.Date; | ||
import { is } from './lib/is'; | ||
export const toBeDate = is.Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import toBeArrayOfSize from './toBeArrayOfSize'; | ||
export default (actual) => toBeArrayOfSize(0, actual); | ||
import { toBeArrayOfSize } from './toBeArrayOfSize'; | ||
export const toBeEmptyArray = (actual) => toBeArrayOfSize(0, actual); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import is from './lib/is'; | ||
import keys from './lib/keys'; | ||
export default (actual) => is.Object(actual) && keys(actual).length === 0; | ||
import { is } from './lib/is'; | ||
import { keys } from './lib/keys'; | ||
export const toBeEmptyObject = (actual) => | ||
is.Object(actual) && keys(actual).length === 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export default (actual) => actual === ''; | ||
export const toBeEmptyString = (actual) => actual === ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
import toBeNumber from './toBeNumber'; | ||
export default (actual) => toBeNumber(actual) && actual % 2 === 0; | ||
import { toBeNumber } from './toBeNumber'; | ||
export const toBeEvenNumber = (actual) => | ||
toBeNumber(actual) && actual % 2 === 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import is from './lib/is'; | ||
export default (actual) => actual === false || is.False(actual); // eslint-disable-line new-cap | ||
import { is } from './lib/is'; | ||
export const toBeFalse = (actual) => actual === false || is.False(actual); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import is from './lib/is'; | ||
export default is.Function; | ||
import { is } from './lib/is'; | ||
export const toBeFunction = is.Function; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import toBeNumber from './toBeNumber'; | ||
import { toBeNumber } from './toBeNumber'; | ||
|
||
export default (otherNumber, actual) => | ||
export const toBeGreaterThanOrEqualTo = (otherNumber, actual) => | ||
toBeNumber(actual) && actual >= otherNumber; |
Oops, something went wrong.