hein 2.0.0-alpha.1 → 2.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/rolldown_runtime.cjs +34 -0
- package/dist/assert/deep-equal.cjs +40 -0
- package/dist/assert/deep-equal.cjs.map +1 -0
- package/dist/assert/deep-equal.d.cts +5 -0
- package/dist/assert/deep-equal.d.cts.map +1 -0
- package/dist/assert/deep-equal.d.ts +5 -0
- package/dist/assert/deep-equal.d.ts.map +1 -0
- package/dist/assert/deep-equal.js +36 -0
- package/dist/assert/deep-equal.js.map +1 -0
- package/dist/assert/deep-has-property.cjs +68 -0
- package/dist/assert/deep-has-property.cjs.map +1 -0
- package/dist/assert/deep-has-property.d.cts +22 -0
- package/dist/assert/deep-has-property.d.cts.map +1 -0
- package/dist/assert/deep-has-property.d.ts +22 -0
- package/dist/assert/deep-has-property.d.ts.map +1 -0
- package/dist/assert/deep-has-property.js +63 -0
- package/dist/assert/deep-has-property.js.map +1 -0
- package/dist/assert/ends-with.cjs +30 -0
- package/dist/assert/ends-with.cjs.map +1 -0
- package/dist/assert/ends-with.d.cts +13 -0
- package/dist/assert/ends-with.d.cts.map +1 -0
- package/dist/assert/ends-with.d.ts +13 -0
- package/dist/assert/ends-with.d.ts.map +1 -0
- package/dist/assert/ends-with.js +27 -0
- package/dist/assert/ends-with.js.map +1 -0
- package/dist/assert/equal.cjs +37 -0
- package/dist/assert/equal.cjs.map +1 -0
- package/dist/assert/equal.d.cts +11 -0
- package/dist/assert/equal.d.cts.map +1 -0
- package/dist/assert/equal.d.ts +11 -0
- package/dist/assert/equal.d.ts.map +1 -0
- package/dist/assert/equal.js +34 -0
- package/dist/assert/equal.js.map +1 -0
- package/dist/assert/greater-than-equal.cjs +32 -0
- package/dist/assert/greater-than-equal.cjs.map +1 -0
- package/dist/assert/greater-than-equal.d.cts +11 -0
- package/dist/assert/greater-than-equal.d.cts.map +1 -0
- package/dist/assert/greater-than-equal.d.ts +11 -0
- package/dist/assert/greater-than-equal.d.ts.map +1 -0
- package/dist/assert/greater-than-equal.js +29 -0
- package/dist/assert/greater-than-equal.js.map +1 -0
- package/dist/assert/greater-than.cjs +33 -0
- package/dist/assert/greater-than.cjs.map +1 -0
- package/dist/assert/greater-than.d.cts +11 -0
- package/dist/assert/greater-than.d.cts.map +1 -0
- package/dist/assert/greater-than.d.ts +11 -0
- package/dist/assert/greater-than.d.ts.map +1 -0
- package/dist/assert/greater-than.js +30 -0
- package/dist/assert/greater-than.js.map +1 -0
- package/dist/assert/has-keys.cjs +58 -0
- package/dist/assert/has-keys.cjs.map +1 -0
- package/dist/assert/has-keys.d.cts +16 -0
- package/dist/assert/has-keys.d.cts.map +1 -0
- package/dist/assert/has-keys.d.ts +16 -0
- package/dist/assert/has-keys.d.ts.map +1 -0
- package/dist/assert/has-keys.js +54 -0
- package/dist/assert/has-keys.js.map +1 -0
- package/dist/assert/has-members.cjs +67 -0
- package/dist/assert/has-members.cjs.map +1 -0
- package/dist/assert/has-members.d.cts +48 -0
- package/dist/assert/has-members.d.cts.map +1 -0
- package/dist/assert/has-members.d.ts +48 -0
- package/dist/assert/has-members.d.ts.map +1 -0
- package/dist/assert/has-members.js +64 -0
- package/dist/assert/has-members.js.map +1 -0
- package/dist/assert/has-property.cjs +61 -0
- package/dist/assert/has-property.cjs.map +1 -0
- package/dist/assert/has-property.d.cts +22 -0
- package/dist/assert/has-property.d.cts.map +1 -0
- package/dist/assert/has-property.d.ts +22 -0
- package/dist/assert/has-property.d.ts.map +1 -0
- package/dist/assert/has-property.js +58 -0
- package/dist/assert/has-property.js.map +1 -0
- package/dist/assert/has-size.cjs +122 -0
- package/dist/assert/has-size.cjs.map +1 -0
- package/dist/assert/has-size.d.cts +42 -0
- package/dist/assert/has-size.d.cts.map +1 -0
- package/dist/assert/has-size.d.ts +42 -0
- package/dist/assert/has-size.d.ts.map +1 -0
- package/dist/assert/has-size.js +118 -0
- package/dist/assert/has-size.js.map +1 -0
- package/dist/assert/in-ballpark.cjs +44 -0
- package/dist/assert/in-ballpark.cjs.map +1 -0
- package/dist/assert/in-ballpark.d.cts +16 -0
- package/dist/assert/in-ballpark.d.cts.map +1 -0
- package/dist/assert/in-ballpark.d.ts +16 -0
- package/dist/assert/in-ballpark.d.ts.map +1 -0
- package/dist/assert/in-ballpark.js +41 -0
- package/dist/assert/in-ballpark.js.map +1 -0
- package/dist/assert/includes.cjs +30 -0
- package/dist/assert/includes.cjs.map +1 -0
- package/dist/assert/includes.d.cts +24 -0
- package/dist/assert/includes.d.cts.map +1 -0
- package/dist/assert/includes.d.ts +24 -0
- package/dist/assert/includes.d.ts.map +1 -0
- package/dist/assert/includes.js +27 -0
- package/dist/assert/includes.js.map +1 -0
- package/dist/assert/instance-of.cjs +36 -0
- package/dist/assert/instance-of.cjs.map +1 -0
- package/dist/assert/instance-of.d.cts +16 -0
- package/dist/assert/instance-of.d.cts.map +1 -0
- package/dist/assert/instance-of.d.ts +16 -0
- package/dist/assert/instance-of.d.ts.map +1 -0
- package/dist/assert/instance-of.js +32 -0
- package/dist/assert/instance-of.js.map +1 -0
- package/dist/assert/is-after.cjs +29 -0
- package/dist/assert/is-after.cjs.map +1 -0
- package/dist/assert/is-after.d.cts +11 -0
- package/dist/assert/is-after.d.cts.map +1 -0
- package/dist/assert/is-after.d.ts +11 -0
- package/dist/assert/is-after.d.ts.map +1 -0
- package/dist/assert/is-after.js +26 -0
- package/dist/assert/is-after.js.map +1 -0
- package/dist/assert/is-before.cjs +29 -0
- package/dist/assert/is-before.cjs.map +1 -0
- package/dist/assert/is-before.d.cts +11 -0
- package/dist/assert/is-before.d.cts.map +1 -0
- package/dist/assert/is-before.d.ts +11 -0
- package/dist/assert/is-before.d.ts.map +1 -0
- package/dist/assert/is-before.js +26 -0
- package/dist/assert/is-before.js.map +1 -0
- package/dist/assert/is-between.cjs +47 -0
- package/dist/assert/is-between.cjs.map +1 -0
- package/dist/assert/is-between.d.cts +15 -0
- package/dist/assert/is-between.d.cts.map +1 -0
- package/dist/assert/is-between.d.ts +15 -0
- package/dist/assert/is-between.d.ts.map +1 -0
- package/dist/assert/is-between.js +44 -0
- package/dist/assert/is-between.js.map +1 -0
- package/dist/assert/is-empty.cjs +98 -0
- package/dist/assert/is-empty.cjs.map +1 -0
- package/dist/assert/is-empty.d.cts +31 -0
- package/dist/assert/is-empty.d.cts.map +1 -0
- package/dist/assert/is-empty.d.ts +31 -0
- package/dist/assert/is-empty.d.ts.map +1 -0
- package/dist/assert/is-empty.js +94 -0
- package/dist/assert/is-empty.js.map +1 -0
- package/dist/assert/is-type.cjs +34 -0
- package/dist/assert/is-type.cjs.map +1 -0
- package/dist/assert/is-type.d.cts +97 -0
- package/dist/assert/is-type.d.cts.map +1 -0
- package/dist/assert/is-type.d.ts +97 -0
- package/dist/assert/is-type.d.ts.map +1 -0
- package/dist/assert/is-type.js +31 -0
- package/dist/assert/is-type.js.map +1 -0
- package/dist/assert/less-than-equal.cjs +36 -0
- package/dist/assert/less-than-equal.cjs.map +1 -0
- package/dist/assert/less-than-equal.d.cts +11 -0
- package/dist/assert/less-than-equal.d.cts.map +1 -0
- package/dist/assert/less-than-equal.d.ts +11 -0
- package/dist/assert/less-than-equal.d.ts.map +1 -0
- package/dist/assert/less-than-equal.js +33 -0
- package/dist/assert/less-than-equal.js.map +1 -0
- package/dist/assert/less-than.cjs +34 -0
- package/dist/assert/less-than.cjs.map +1 -0
- package/dist/assert/less-than.d.cts +11 -0
- package/dist/assert/less-than.d.cts.map +1 -0
- package/dist/assert/less-than.d.ts +11 -0
- package/dist/assert/less-than.d.ts.map +1 -0
- package/dist/assert/less-than.js +31 -0
- package/dist/assert/less-than.js.map +1 -0
- package/dist/assert/match.cjs +31 -0
- package/dist/assert/match.cjs.map +1 -0
- package/dist/assert/match.d.cts +15 -0
- package/dist/assert/match.d.cts.map +1 -0
- package/dist/assert/match.d.ts +15 -0
- package/dist/assert/match.d.ts.map +1 -0
- package/dist/assert/match.js +28 -0
- package/dist/assert/match.js.map +1 -0
- package/dist/assert/rejects.cjs +49 -0
- package/dist/assert/rejects.cjs.map +1 -0
- package/dist/assert/rejects.d.cts +36 -0
- package/dist/assert/rejects.d.cts.map +1 -0
- package/dist/assert/rejects.d.ts +36 -0
- package/dist/assert/rejects.d.ts.map +1 -0
- package/dist/assert/rejects.js +46 -0
- package/dist/assert/rejects.js.map +1 -0
- package/dist/assert/round-to.cjs +54 -0
- package/dist/assert/round-to.cjs.map +1 -0
- package/dist/assert/round-to.d.cts +15 -0
- package/dist/assert/round-to.d.cts.map +1 -0
- package/dist/assert/round-to.d.ts +15 -0
- package/dist/assert/round-to.d.ts.map +1 -0
- package/dist/assert/round-to.js +51 -0
- package/dist/assert/round-to.js.map +1 -0
- package/dist/assert/starts-with.cjs +30 -0
- package/dist/assert/starts-with.cjs.map +1 -0
- package/dist/assert/starts-with.d.cts +14 -0
- package/dist/assert/starts-with.d.cts.map +1 -0
- package/dist/assert/starts-with.d.ts +14 -0
- package/dist/assert/starts-with.d.ts.map +1 -0
- package/dist/assert/starts-with.js +27 -0
- package/dist/assert/starts-with.js.map +1 -0
- package/dist/assert/throws.cjs +41 -0
- package/dist/assert/throws.cjs.map +1 -0
- package/dist/{throws-CYLYG7gu.d.cts → assert/throws.d.cts} +4 -11
- package/dist/assert/throws.d.cts.map +1 -0
- package/dist/{throws-BlzO4xvg.d.ts → assert/throws.d.ts} +3 -12
- package/dist/assert/throws.d.ts.map +1 -0
- package/dist/assert/throws.js +38 -0
- package/dist/assert/throws.js.map +1 -0
- package/dist/assert.cjs +143 -52
- package/dist/assert.cjs.map +1 -0
- package/dist/assert.d.cts +34 -3
- package/dist/assert.d.cts.map +1 -0
- package/dist/assert.d.ts +34 -3
- package/dist/assert.d.ts.map +1 -0
- package/dist/assert.js +87 -2
- package/dist/assert.js.map +1 -0
- package/dist/expect/after.cjs +15 -0
- package/dist/expect/after.cjs.map +1 -0
- package/dist/expect/after.js +16 -0
- package/dist/expect/after.js.map +1 -0
- package/dist/expect/ballpark.cjs +15 -0
- package/dist/expect/ballpark.cjs.map +1 -0
- package/dist/expect/ballpark.js +16 -0
- package/dist/expect/ballpark.js.map +1 -0
- package/dist/expect/before.cjs +15 -0
- package/dist/expect/before.cjs.map +1 -0
- package/dist/expect/before.js +16 -0
- package/dist/expect/before.js.map +1 -0
- package/dist/expect/between.cjs +15 -0
- package/dist/expect/between.cjs.map +1 -0
- package/dist/expect/between.js +16 -0
- package/dist/expect/between.js.map +1 -0
- package/dist/expect/empty.cjs +15 -0
- package/dist/expect/empty.cjs.map +1 -0
- package/dist/expect/empty.js +16 -0
- package/dist/expect/empty.js.map +1 -0
- package/dist/expect/end-with.cjs +15 -0
- package/dist/expect/end-with.cjs.map +1 -0
- package/dist/expect/end-with.js +16 -0
- package/dist/expect/end-with.js.map +1 -0
- package/dist/expect/eql.cjs +21 -0
- package/dist/expect/eql.cjs.map +1 -0
- package/dist/expect/eql.js +22 -0
- package/dist/expect/eql.js.map +1 -0
- package/dist/expect/equal-shorthand.cjs +34 -0
- package/dist/expect/equal-shorthand.cjs.map +1 -0
- package/dist/expect/equal-shorthand.js +33 -0
- package/dist/expect/equal-shorthand.js.map +1 -0
- package/dist/expect/equal.cjs +27 -0
- package/dist/expect/equal.cjs.map +1 -0
- package/dist/expect/equal.js +28 -0
- package/dist/expect/equal.js.map +1 -0
- package/dist/expect/excluding.cjs +19 -0
- package/dist/expect/excluding.cjs.map +1 -0
- package/dist/expect/excluding.js +18 -0
- package/dist/expect/excluding.js.map +1 -0
- package/dist/expect/greater-than-equal.cjs +25 -0
- package/dist/expect/greater-than-equal.cjs.map +1 -0
- package/dist/expect/greater-than-equal.js +26 -0
- package/dist/expect/greater-than-equal.js.map +1 -0
- package/dist/expect/greater-than.cjs +25 -0
- package/dist/expect/greater-than.cjs.map +1 -0
- package/dist/expect/greater-than.js +26 -0
- package/dist/expect/greater-than.js.map +1 -0
- package/dist/expect/has-property.cjs +20 -0
- package/dist/expect/has-property.cjs.map +1 -0
- package/dist/expect/has-property.js +21 -0
- package/dist/expect/has-property.js.map +1 -0
- package/dist/expect/include.cjs +21 -0
- package/dist/expect/include.cjs.map +1 -0
- package/dist/expect/include.js +22 -0
- package/dist/expect/include.js.map +1 -0
- package/dist/expect/instance-of-shorthand.cjs +24 -0
- package/dist/expect/instance-of-shorthand.cjs.map +1 -0
- package/dist/expect/instance-of-shorthand.js +25 -0
- package/dist/expect/instance-of-shorthand.js.map +1 -0
- package/dist/expect/instance-of.cjs +15 -0
- package/dist/expect/instance-of.cjs.map +1 -0
- package/dist/expect/instance-of.js +16 -0
- package/dist/expect/instance-of.js.map +1 -0
- package/dist/expect/keys.cjs +15 -0
- package/dist/expect/keys.cjs.map +1 -0
- package/dist/expect/keys.js +16 -0
- package/dist/expect/keys.js.map +1 -0
- package/dist/expect/length.cjs +21 -0
- package/dist/expect/length.cjs.map +1 -0
- package/dist/expect/length.js +22 -0
- package/dist/expect/length.js.map +1 -0
- package/dist/expect/less-than-equal.cjs +25 -0
- package/dist/expect/less-than-equal.cjs.map +1 -0
- package/dist/expect/less-than-equal.js +26 -0
- package/dist/expect/less-than-equal.js.map +1 -0
- package/dist/expect/less-than.cjs +25 -0
- package/dist/expect/less-than.cjs.map +1 -0
- package/dist/expect/less-than.js +26 -0
- package/dist/expect/less-than.js.map +1 -0
- package/dist/expect/match.cjs +15 -0
- package/dist/expect/match.cjs.map +1 -0
- package/dist/expect/match.js +16 -0
- package/dist/expect/match.js.map +1 -0
- package/dist/expect/members.cjs +41 -0
- package/dist/expect/members.cjs.map +1 -0
- package/dist/expect/members.js +42 -0
- package/dist/expect/members.js.map +1 -0
- package/dist/expect/reject.cjs +14 -0
- package/dist/expect/reject.cjs.map +1 -0
- package/dist/expect/reject.js +15 -0
- package/dist/expect/reject.js.map +1 -0
- package/dist/expect/round-to.cjs +15 -0
- package/dist/expect/round-to.cjs.map +1 -0
- package/dist/expect/round-to.js +16 -0
- package/dist/expect/round-to.js.map +1 -0
- package/dist/expect/start-with.cjs +15 -0
- package/dist/expect/start-with.cjs.map +1 -0
- package/dist/expect/start-with.js +16 -0
- package/dist/expect/start-with.js.map +1 -0
- package/dist/expect/throw.cjs +14 -0
- package/dist/expect/throw.cjs.map +1 -0
- package/dist/expect/throw.js +15 -0
- package/dist/expect/throw.js.map +1 -0
- package/dist/expect/type-shorthand.cjs +29 -0
- package/dist/expect/type-shorthand.cjs.map +1 -0
- package/dist/expect/type-shorthand.js +30 -0
- package/dist/expect/type-shorthand.js.map +1 -0
- package/dist/expect/type.cjs +15 -0
- package/dist/expect/type.cjs.map +1 -0
- package/dist/expect/type.js +16 -0
- package/dist/expect/type.js.map +1 -0
- package/dist/expect.cjs +144 -0
- package/dist/expect.cjs.map +1 -0
- package/dist/expect.d.cts +10 -0
- package/dist/expect.d.cts.map +1 -0
- package/dist/expect.d.ts +10 -0
- package/dist/expect.d.ts.map +1 -0
- package/dist/expect.js +141 -0
- package/dist/expect.js.map +1 -0
- package/dist/expect.types.d.cts +67 -3
- package/dist/expect.types.d.cts.map +1 -0
- package/dist/expect.types.d.ts +67 -3
- package/dist/expect.types.d.ts.map +1 -0
- package/dist/index.cjs +13 -582
- package/dist/index.d.cts +8 -15
- package/dist/index.d.ts +8 -15
- package/dist/index.js +8 -575
- package/dist/mixins.cjs +11 -0
- package/dist/mixins.cjs.map +1 -0
- package/dist/mixins.d.cts +28 -0
- package/dist/mixins.d.cts.map +1 -0
- package/dist/mixins.d.ts +28 -0
- package/dist/mixins.d.ts.map +1 -0
- package/dist/mixins.js +9 -0
- package/dist/mixins.js.map +1 -0
- package/dist/utils/chain.cjs +20 -0
- package/dist/utils/chain.cjs.map +1 -0
- package/dist/utils/chain.js +18 -0
- package/dist/utils/chain.js.map +1 -0
- package/dist/utils/fail.cjs +16 -0
- package/dist/utils/fail.cjs.map +1 -0
- package/dist/utils/fail.d.cts +9 -0
- package/dist/utils/fail.d.cts.map +1 -0
- package/dist/utils/fail.d.ts +9 -0
- package/dist/utils/fail.d.ts.map +1 -0
- package/dist/utils/fail.js +14 -0
- package/dist/utils/fail.js.map +1 -0
- package/dist/utils/get-size.cjs +17 -0
- package/dist/utils/get-size.cjs.map +1 -0
- package/dist/utils/get-size.js +15 -0
- package/dist/utils/get-size.js.map +1 -0
- package/dist/utils/get-type.cjs +12 -0
- package/dist/utils/get-type.cjs.map +1 -0
- package/dist/utils/get-type.d.cts +5 -0
- package/dist/utils/get-type.d.cts.map +1 -0
- package/dist/utils/get-type.d.ts +5 -0
- package/dist/utils/get-type.d.ts.map +1 -0
- package/dist/utils/get-type.js +11 -0
- package/dist/utils/get-type.js.map +1 -0
- package/dist/utils/match.cjs +118 -0
- package/dist/utils/match.cjs.map +1 -0
- package/dist/utils/match.d.cts +7 -0
- package/dist/utils/match.d.cts.map +1 -0
- package/dist/utils/match.d.ts +7 -0
- package/dist/utils/match.d.ts.map +1 -0
- package/dist/utils/match.js +114 -0
- package/dist/utils/match.js.map +1 -0
- package/dist/utils/process-error.cjs +86 -0
- package/dist/utils/process-error.cjs.map +1 -0
- package/dist/utils/process-error.d.cts +8 -0
- package/dist/utils/process-error.d.cts.map +1 -0
- package/dist/utils/process-error.d.ts +10 -0
- package/dist/utils/process-error.d.ts.map +1 -0
- package/dist/utils/process-error.js +85 -0
- package/dist/utils/process-error.js.map +1 -0
- package/dist/utils/validate-numeric-and-dates.cjs +20 -0
- package/dist/utils/validate-numeric-and-dates.cjs.map +1 -0
- package/dist/utils/validate-numeric-and-dates.js +18 -0
- package/dist/utils/validate-numeric-and-dates.js.map +1 -0
- package/dist/utils/xor.cjs +9 -0
- package/dist/utils/xor.cjs.map +1 -0
- package/dist/utils/xor.js +8 -0
- package/dist/utils/xor.js.map +1 -0
- package/package.json +1 -1
- package/dist/assert-ChQPKP5C.d.cts +0 -480
- package/dist/assert-ChQPKP5C.d.cts.map +0 -1
- package/dist/assert-CsN7srt-.d.ts +0 -478
- package/dist/assert-CsN7srt-.d.ts.map +0 -1
- package/dist/assert-DZjgWjOw.cjs +0 -1626
- package/dist/assert-DZjgWjOw.cjs.map +0 -1
- package/dist/assert-kFXp7i_B.js +0 -1260
- package/dist/assert-kFXp7i_B.js.map +0 -1
- package/dist/expect.types-CHYPdbCW.d.cts +0 -454
- package/dist/expect.types-CHYPdbCW.d.cts.map +0 -1
- package/dist/expect.types-nBq4Rg8e.d.ts +0 -454
- package/dist/expect.types-nBq4Rg8e.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/throws-BlzO4xvg.d.ts.map +0 -1
- package/dist/throws-CYLYG7gu.d.cts.map +0 -1
- /package/dist/{chunk-CTAAG5j7.js → _virtual/rolldown_runtime.js} +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { match, notMatch } from "../assert/match.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/match.ts
|
|
6
|
+
use({ match: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (regex) => {
|
|
9
|
+
if (inverted) notMatch(value, regex);
|
|
10
|
+
else match(value, regex);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { };
|
|
16
|
+
//# sourceMappingURL=match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.js","names":[],"sources":["../../src/expect/match.ts"],"sourcesContent":["import { match, notMatch } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface StringExpect<T> {\n /**\n * check if string matches regex\n */\n match(regex: RegExp): this;\n }\n}\n\nuse({\n match: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (regex: RegExp) => {\n if (inverted) {\n notMatch(value, regex);\n } else {\n match(value, regex);\n }\n }\n }\n});\n"],"mappings":";;;;;AAaA,IAAI,EACA,OAAO;CACH,MAAM;CACN,QACK,EAAE,OAAO,gBACT,UAAkB;AACf,MAAI,SACA,UAAS,OAAO,MAAM;MAEtB,OAAM,OAAO,MAAM;;CAGlC,EACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_has_members = require('../assert/has-members.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/members.ts
|
|
6
|
+
require_mixins.use({
|
|
7
|
+
members: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted, same, deep, ordered, partial }) => (other, message) => {
|
|
10
|
+
if (inverted) require_has_members.notHasMembers(value, other, {
|
|
11
|
+
deep,
|
|
12
|
+
same,
|
|
13
|
+
ordered,
|
|
14
|
+
partial
|
|
15
|
+
}, message);
|
|
16
|
+
else require_has_members.hasMembers(value, other, {
|
|
17
|
+
deep,
|
|
18
|
+
same,
|
|
19
|
+
ordered,
|
|
20
|
+
partial
|
|
21
|
+
}, message);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
same: {
|
|
25
|
+
type: "property",
|
|
26
|
+
value: (state) => {
|
|
27
|
+
state.same = true;
|
|
28
|
+
return state;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
ordered: {
|
|
32
|
+
type: "property",
|
|
33
|
+
value: (state) => {
|
|
34
|
+
state.ordered = true;
|
|
35
|
+
return state;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=members.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.cjs","names":["use"],"sources":["../../src/expect/members.ts"],"sourcesContent":["import { hasMembers, notHasMembers } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type DeepPartial } from '../utils/types.js';\n\ntype InferArray<T> = T extends Array<infer U> ? U : any;\n\ndeclare module '../expect.types' {\n interface ArrayExpect<T> {\n /**\n * check that the members in second array are present in the first one\n */\n members(value: InferArray<T>[], message?: string): this;\n same: ArrayExpect<T>;\n ordered: ArrayExpect<T>;\n /**\n * Use partial matching for objects\n * @example\n * expect({ a: 1, b: 2 }).to.partially.eql({ a: 1 });\n */\n partially: ArrayExpect<DeepPartial<T>>;\n }\n}\n\nuse({\n members: {\n type: 'method',\n value:\n ({ value, inverted, same, deep, ordered, partial }) =>\n (other: any, message?: string) => {\n if (inverted) {\n notHasMembers(value, other, { deep, same, ordered, partial }, message);\n } else {\n hasMembers(value, other, { deep, same, ordered, partial }, message);\n }\n }\n },\n same: {\n type: 'property',\n value: (state) => {\n state.same = true;\n return state;\n }\n },\n ordered: {\n type: 'property',\n value: (state) => {\n state.ordered = true;\n return state;\n }\n }\n});\n"],"mappings":";;;;;AAuBAA,mBAAI;CACA,SAAS;EACL,MAAM;EACN,QACK,EAAE,OAAO,UAAU,MAAM,MAAM,SAAS,eACxC,OAAY,YAAqB;AAC9B,OAAI,SACA,mCAAc,OAAO,OAAO;IAAE;IAAM;IAAM;IAAS;IAAS,EAAE,QAAQ;OAEtE,gCAAW,OAAO,OAAO;IAAE;IAAM;IAAM;IAAS;IAAS,EAAE,QAAQ;;EAGlF;CACD,MAAM;EACF,MAAM;EACN,QAAQ,UAAU;AACd,SAAM,OAAO;AACb,UAAO;;EAEd;CACD,SAAS;EACL,MAAM;EACN,QAAQ,UAAU;AACd,SAAM,UAAU;AAChB,UAAO;;EAEd;CACJ,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { hasMembers, notHasMembers } from "../assert/has-members.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/members.ts
|
|
6
|
+
use({
|
|
7
|
+
members: {
|
|
8
|
+
type: "method",
|
|
9
|
+
value: ({ value, inverted, same, deep, ordered, partial }) => (other, message) => {
|
|
10
|
+
if (inverted) notHasMembers(value, other, {
|
|
11
|
+
deep,
|
|
12
|
+
same,
|
|
13
|
+
ordered,
|
|
14
|
+
partial
|
|
15
|
+
}, message);
|
|
16
|
+
else hasMembers(value, other, {
|
|
17
|
+
deep,
|
|
18
|
+
same,
|
|
19
|
+
ordered,
|
|
20
|
+
partial
|
|
21
|
+
}, message);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
same: {
|
|
25
|
+
type: "property",
|
|
26
|
+
value: (state) => {
|
|
27
|
+
state.same = true;
|
|
28
|
+
return state;
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
ordered: {
|
|
32
|
+
type: "property",
|
|
33
|
+
value: (state) => {
|
|
34
|
+
state.ordered = true;
|
|
35
|
+
return state;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { };
|
|
42
|
+
//# sourceMappingURL=members.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"members.js","names":[],"sources":["../../src/expect/members.ts"],"sourcesContent":["import { hasMembers, notHasMembers } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type DeepPartial } from '../utils/types.js';\n\ntype InferArray<T> = T extends Array<infer U> ? U : any;\n\ndeclare module '../expect.types' {\n interface ArrayExpect<T> {\n /**\n * check that the members in second array are present in the first one\n */\n members(value: InferArray<T>[], message?: string): this;\n same: ArrayExpect<T>;\n ordered: ArrayExpect<T>;\n /**\n * Use partial matching for objects\n * @example\n * expect({ a: 1, b: 2 }).to.partially.eql({ a: 1 });\n */\n partially: ArrayExpect<DeepPartial<T>>;\n }\n}\n\nuse({\n members: {\n type: 'method',\n value:\n ({ value, inverted, same, deep, ordered, partial }) =>\n (other: any, message?: string) => {\n if (inverted) {\n notHasMembers(value, other, { deep, same, ordered, partial }, message);\n } else {\n hasMembers(value, other, { deep, same, ordered, partial }, message);\n }\n }\n },\n same: {\n type: 'property',\n value: (state) => {\n state.same = true;\n return state;\n }\n },\n ordered: {\n type: 'property',\n value: (state) => {\n state.ordered = true;\n return state;\n }\n }\n});\n"],"mappings":";;;;;AAuBA,IAAI;CACA,SAAS;EACL,MAAM;EACN,QACK,EAAE,OAAO,UAAU,MAAM,MAAM,SAAS,eACxC,OAAY,YAAqB;AAC9B,OAAI,SACA,eAAc,OAAO,OAAO;IAAE;IAAM;IAAM;IAAS;IAAS,EAAE,QAAQ;OAEtE,YAAW,OAAO,OAAO;IAAE;IAAM;IAAM;IAAS;IAAS,EAAE,QAAQ;;EAGlF;CACD,MAAM;EACF,MAAM;EACN,QAAQ,UAAU;AACd,SAAM,OAAO;AACb,UAAO;;EAEd;CACD,SAAS;EACL,MAAM;EACN,QAAQ,UAAU;AACd,SAAM,UAAU;AAChB,UAAO;;EAEd;CACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const require_rejects = require('../assert/rejects.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/reject.ts
|
|
6
|
+
require_mixins.use({ reject: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (...args) => {
|
|
9
|
+
return inverted ? require_rejects.notRejects(value, ...args) : require_rejects.rejects(value, ...args);
|
|
10
|
+
}
|
|
11
|
+
} });
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=reject.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reject.cjs","names":["use","notRejects","rejects"],"sources":["../../src/expect/reject.ts"],"sourcesContent":["import { notRejects, rejects } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { type Constructor, type ErrorPredicate } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface PromiseExpect<T> {\n /**\n * check if promise rejects\n * @param message\n */\n reject(message?: string): Promise<void>;\n reject(matcher: RegExp | Constructor<Error> | ErrorPredicate): Promise<void>;\n }\n}\n\nuse({\n reject: {\n type: 'method',\n value:\n ({ value, inverted }: State<any>) =>\n (...args: any[]) => {\n return inverted ? notRejects(value, ...args) : rejects(value, ...args);\n }\n }\n});\n"],"mappings":";;;;;AAgBAA,mBAAI,EACA,QAAQ;CACJ,MAAM;CACN,QACK,EAAE,OAAO,gBACT,GAAG,SAAgB;AAChB,SAAO,WAAWC,2BAAW,OAAO,GAAG,KAAK,GAAGC,wBAAQ,OAAO,GAAG,KAAK;;CAEjF,EACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { notRejects, rejects } from "../assert/rejects.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/reject.ts
|
|
6
|
+
use({ reject: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (...args) => {
|
|
9
|
+
return inverted ? notRejects(value, ...args) : rejects(value, ...args);
|
|
10
|
+
}
|
|
11
|
+
} });
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { };
|
|
15
|
+
//# sourceMappingURL=reject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reject.js","names":[],"sources":["../../src/expect/reject.ts"],"sourcesContent":["import { notRejects, rejects } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { type Constructor, type ErrorPredicate } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface PromiseExpect<T> {\n /**\n * check if promise rejects\n * @param message\n */\n reject(message?: string): Promise<void>;\n reject(matcher: RegExp | Constructor<Error> | ErrorPredicate): Promise<void>;\n }\n}\n\nuse({\n reject: {\n type: 'method',\n value:\n ({ value, inverted }: State<any>) =>\n (...args: any[]) => {\n return inverted ? notRejects(value, ...args) : rejects(value, ...args);\n }\n }\n});\n"],"mappings":";;;;;AAgBA,IAAI,EACA,QAAQ;CACJ,MAAM;CACN,QACK,EAAE,OAAO,gBACT,GAAG,SAAgB;AAChB,SAAO,WAAW,WAAW,OAAO,GAAG,KAAK,GAAG,QAAQ,OAAO,GAAG,KAAK;;CAEjF,EACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_round_to = require('../assert/round-to.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/round-to.ts
|
|
6
|
+
require_mixins.use({ roundTo: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (target, decimal = 0) => {
|
|
9
|
+
if (inverted) require_round_to.notRoundTo(value, target, decimal);
|
|
10
|
+
else require_round_to.roundTo(value, target, decimal);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=round-to.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-to.cjs","names":["use"],"sources":["../../src/expect/round-to.ts"],"sourcesContent":["import { notRoundTo, roundTo } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect {\n /**\n * check if number close enough (default 10%)\n * @param target\n * @param decimal defaults to 0, can be negative if trying to round down to nearest 10, 100, etc\n */\n roundTo(target: number, decimal?: number): this;\n }\n}\n\nuse({\n roundTo: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (target, decimal = 0) => {\n if (inverted) {\n notRoundTo(value, target, decimal);\n } else {\n roundTo(value, target, decimal);\n }\n }\n }\n});\n"],"mappings":";;;;;AAcAA,mBAAI,EACA,SAAS;CACL,MAAM;CACN,QACK,EAAE,OAAO,gBACT,QAAQ,UAAU,MAAM;AACrB,MAAI,SACA,6BAAW,OAAO,QAAQ,QAAQ;MAElC,0BAAQ,OAAO,QAAQ,QAAQ;;CAG9C,EACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { notRoundTo, roundTo } from "../assert/round-to.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/round-to.ts
|
|
6
|
+
use({ roundTo: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (target, decimal = 0) => {
|
|
9
|
+
if (inverted) notRoundTo(value, target, decimal);
|
|
10
|
+
else roundTo(value, target, decimal);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { };
|
|
16
|
+
//# sourceMappingURL=round-to.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round-to.js","names":[],"sources":["../../src/expect/round-to.ts"],"sourcesContent":["import { notRoundTo, roundTo } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface NumberExpect {\n /**\n * check if number close enough (default 10%)\n * @param target\n * @param decimal defaults to 0, can be negative if trying to round down to nearest 10, 100, etc\n */\n roundTo(target: number, decimal?: number): this;\n }\n}\n\nuse({\n roundTo: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (target, decimal = 0) => {\n if (inverted) {\n notRoundTo(value, target, decimal);\n } else {\n roundTo(value, target, decimal);\n }\n }\n }\n});\n"],"mappings":";;;;;AAcA,IAAI,EACA,SAAS;CACL,MAAM;CACN,QACK,EAAE,OAAO,gBACT,QAAQ,UAAU,MAAM;AACrB,MAAI,SACA,YAAW,OAAO,QAAQ,QAAQ;MAElC,SAAQ,OAAO,QAAQ,QAAQ;;CAG9C,EACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_starts_with = require('../assert/starts-with.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/start-with.ts
|
|
6
|
+
require_mixins.use({ startWith: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (start) => {
|
|
9
|
+
if (inverted) require_starts_with.notStartsWith(value, start);
|
|
10
|
+
else require_starts_with.startsWith(value, start);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=start-with.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-with.cjs","names":["use"],"sources":["../../src/expect/start-with.ts"],"sourcesContent":["import { startsWith, notStartsWith } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface StringExpect {\n /**\n * check if string starts with other string\n * @param start\n * @example startsWith('foo', 'f');\n */\n startWith(start: string): this;\n }\n}\n\nuse({\n startWith: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (start: string) => {\n if (inverted) {\n notStartsWith(value, start);\n } else {\n startsWith(value, start);\n }\n }\n }\n});\n"],"mappings":";;;;;AAcAA,mBAAI,EACA,WAAW;CACP,MAAM;CACN,QACK,EAAE,OAAO,gBACT,UAAkB;AACf,MAAI,SACA,mCAAc,OAAO,MAAM;MAE3B,gCAAW,OAAO,MAAM;;CAGvC,EACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { notStartsWith, startsWith } from "../assert/starts-with.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/start-with.ts
|
|
6
|
+
use({ startWith: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (start) => {
|
|
9
|
+
if (inverted) notStartsWith(value, start);
|
|
10
|
+
else startsWith(value, start);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { };
|
|
16
|
+
//# sourceMappingURL=start-with.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-with.js","names":[],"sources":["../../src/expect/start-with.ts"],"sourcesContent":["import { startsWith, notStartsWith } from '../assert.js';\nimport { use } from '../mixins.js';\n\ndeclare module '../expect.types' {\n interface StringExpect {\n /**\n * check if string starts with other string\n * @param start\n * @example startsWith('foo', 'f');\n */\n startWith(start: string): this;\n }\n}\n\nuse({\n startWith: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (start: string) => {\n if (inverted) {\n notStartsWith(value, start);\n } else {\n startsWith(value, start);\n }\n }\n }\n});\n"],"mappings":";;;;;AAcA,IAAI,EACA,WAAW;CACP,MAAM;CACN,QACK,EAAE,OAAO,gBACT,UAAkB;AACf,MAAI,SACA,eAAc,OAAO,MAAM;MAE3B,YAAW,OAAO,MAAM;;CAGvC,EACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const require_throws = require('../assert/throws.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/throw.ts
|
|
6
|
+
require_mixins.use({ throw: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (...args) => {
|
|
9
|
+
return inverted ? require_throws.notThrows(value, ...args) : require_throws.throws(value, ...args);
|
|
10
|
+
}
|
|
11
|
+
} });
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=throw.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throw.cjs","names":["use","notThrows","throws"],"sources":["../../src/expect/throw.ts"],"sourcesContent":["import { notThrows, throws } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { type Constructor, type ErrorPredicate } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface FunctionExpect<T> {\n /**\n * check if function throws\n * @param message\n */\n throw(message?: string): this;\n throw(matcher: RegExp | Constructor<Error> | ErrorPredicate, message?: string): this;\n }\n}\n\nuse({\n throw: {\n type: 'method',\n value:\n ({ value, inverted }: State<any>) =>\n (...args: any[]) => {\n return inverted ? notThrows(value, ...args) : throws(value, ...args);\n }\n }\n});\n"],"mappings":";;;;;AAgBAA,mBAAI,EACA,OAAO;CACH,MAAM;CACN,QACK,EAAE,OAAO,gBACT,GAAG,SAAgB;AAChB,SAAO,WAAWC,yBAAU,OAAO,GAAG,KAAK,GAAGC,sBAAO,OAAO,GAAG,KAAK;;CAE/E,EACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { notThrows, throws } from "../assert/throws.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/throw.ts
|
|
6
|
+
use({ throw: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (...args) => {
|
|
9
|
+
return inverted ? notThrows(value, ...args) : throws(value, ...args);
|
|
10
|
+
}
|
|
11
|
+
} });
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { };
|
|
15
|
+
//# sourceMappingURL=throw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throw.js","names":[],"sources":["../../src/expect/throw.ts"],"sourcesContent":["import { notThrows, throws } from '../assert.js';\nimport { type State, use } from '../mixins.js';\nimport { type Constructor, type ErrorPredicate } from '../utils/process-error.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface FunctionExpect<T> {\n /**\n * check if function throws\n * @param message\n */\n throw(message?: string): this;\n throw(matcher: RegExp | Constructor<Error> | ErrorPredicate, message?: string): this;\n }\n}\n\nuse({\n throw: {\n type: 'method',\n value:\n ({ value, inverted }: State<any>) =>\n (...args: any[]) => {\n return inverted ? notThrows(value, ...args) : throws(value, ...args);\n }\n }\n});\n"],"mappings":";;;;;AAgBA,IAAI,EACA,OAAO;CACH,MAAM;CACN,QACK,EAAE,OAAO,gBACT,GAAG,SAAgB;AAChB,SAAO,WAAW,UAAU,OAAO,GAAG,KAAK,GAAG,OAAO,OAAO,GAAG,KAAK;;CAE/E,EACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_is_type = require('../assert/is-type.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/type-shorthand.ts
|
|
6
|
+
require_mixins.use(Object.fromEntries([
|
|
7
|
+
"NaN",
|
|
8
|
+
"array",
|
|
9
|
+
"bigint",
|
|
10
|
+
"boolean",
|
|
11
|
+
"function",
|
|
12
|
+
"null",
|
|
13
|
+
"number",
|
|
14
|
+
"object",
|
|
15
|
+
"string",
|
|
16
|
+
"symbol",
|
|
17
|
+
"undefined"
|
|
18
|
+
].map((type) => {
|
|
19
|
+
return [type, {
|
|
20
|
+
type: "method",
|
|
21
|
+
value: ({ value, inverted }) => () => {
|
|
22
|
+
if (inverted) require_is_type.notIsType(value, type);
|
|
23
|
+
else require_is_type.isType(value, type);
|
|
24
|
+
}
|
|
25
|
+
}];
|
|
26
|
+
})));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=type-shorthand.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-shorthand.cjs","names":["use"],"sources":["../../src/expect/type-shorthand.ts"],"sourcesContent":["import { isType, notIsType } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type ValueType } from '../utils/get-type.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface NumberExpect<T> {\n /**\n * check if value is a number\n */\n number(): this;\n /**\n * check if value is a NaN\n */\n NaN(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ArrayExpect<T> {\n /**\n * check if value is an array\n */\n array(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface BigIntExpect<T> {\n /**\n * check if value is a bigint\n */\n bigint(): this;\n }\n interface BooleanExpect {\n /**\n * check if value is a boolean\n */\n boolean(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface FunctionExpect<T> {\n /**\n * check if value is a function\n */\n function(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if value is null\n */\n null(): this;\n /**\n * check if value is undefined\n */\n undefined(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if value is a plain object\n */\n object(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface StringExpect<T> {\n /**\n * check if value is a string\n */\n string(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface SymbolExpect<T> {\n /**\n * check if value is a symbol\n */\n symbol(): this;\n }\n}\n\nconst types: ValueType[] = [\n 'NaN',\n 'array',\n 'bigint',\n 'boolean',\n 'function',\n 'null',\n 'number',\n 'object',\n 'string',\n 'symbol',\n 'undefined'\n];\n\nuse(\n Object.fromEntries(\n types.map((type) => {\n return [\n type,\n {\n type: 'method',\n value:\n ({ value, inverted }) =>\n () => {\n if (inverted) {\n notIsType(value, type);\n } else {\n isType(value, type);\n }\n }\n }\n ];\n })\n )\n);\n"],"mappings":";;;;;AA2FAA,mBACI,OAAO,YAfgB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,CAIa,KAAK,SAAS;AAChB,QAAO,CACH,MACA;EACI,MAAM;EACN,QACK,EAAE,OAAO,qBACJ;AACF,OAAI,SACA,2BAAU,OAAO,KAAK;OAEtB,wBAAO,OAAO,KAAK;;EAGlC,CACJ;EACH,CACL,CACJ"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { isType, notIsType } from "../assert/is-type.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/type-shorthand.ts
|
|
6
|
+
use(Object.fromEntries([
|
|
7
|
+
"NaN",
|
|
8
|
+
"array",
|
|
9
|
+
"bigint",
|
|
10
|
+
"boolean",
|
|
11
|
+
"function",
|
|
12
|
+
"null",
|
|
13
|
+
"number",
|
|
14
|
+
"object",
|
|
15
|
+
"string",
|
|
16
|
+
"symbol",
|
|
17
|
+
"undefined"
|
|
18
|
+
].map((type) => {
|
|
19
|
+
return [type, {
|
|
20
|
+
type: "method",
|
|
21
|
+
value: ({ value, inverted }) => () => {
|
|
22
|
+
if (inverted) notIsType(value, type);
|
|
23
|
+
else isType(value, type);
|
|
24
|
+
}
|
|
25
|
+
}];
|
|
26
|
+
})));
|
|
27
|
+
|
|
28
|
+
//#endregion
|
|
29
|
+
export { };
|
|
30
|
+
//# sourceMappingURL=type-shorthand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-shorthand.js","names":[],"sources":["../../src/expect/type-shorthand.ts"],"sourcesContent":["import { isType, notIsType } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type ValueType } from '../utils/get-type.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface NumberExpect<T> {\n /**\n * check if value is a number\n */\n number(): this;\n /**\n * check if value is a NaN\n */\n NaN(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ArrayExpect<T> {\n /**\n * check if value is an array\n */\n array(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface BigIntExpect<T> {\n /**\n * check if value is a bigint\n */\n bigint(): this;\n }\n interface BooleanExpect {\n /**\n * check if value is a boolean\n */\n boolean(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface FunctionExpect<T> {\n /**\n * check if value is a function\n */\n function(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if value is null\n */\n null(): this;\n /**\n * check if value is undefined\n */\n undefined(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ObjectExpect<T> {\n /**\n * check if value is a plain object\n */\n object(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface StringExpect<T> {\n /**\n * check if value is a string\n */\n string(): this;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface SymbolExpect<T> {\n /**\n * check if value is a symbol\n */\n symbol(): this;\n }\n}\n\nconst types: ValueType[] = [\n 'NaN',\n 'array',\n 'bigint',\n 'boolean',\n 'function',\n 'null',\n 'number',\n 'object',\n 'string',\n 'symbol',\n 'undefined'\n];\n\nuse(\n Object.fromEntries(\n types.map((type) => {\n return [\n type,\n {\n type: 'method',\n value:\n ({ value, inverted }) =>\n () => {\n if (inverted) {\n notIsType(value, type);\n } else {\n isType(value, type);\n }\n }\n }\n ];\n })\n )\n);\n"],"mappings":";;;;;AA2FA,IACI,OAAO,YAfgB;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,CAIa,KAAK,SAAS;AAChB,QAAO,CACH,MACA;EACI,MAAM;EACN,QACK,EAAE,OAAO,qBACJ;AACF,OAAI,SACA,WAAU,OAAO,KAAK;OAEtB,QAAO,OAAO,KAAK;;EAGlC,CACJ;EACH,CACL,CACJ"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const require_is_type = require('../assert/is-type.cjs');
|
|
2
|
+
require('../assert.cjs');
|
|
3
|
+
const require_mixins = require('../mixins.cjs');
|
|
4
|
+
|
|
5
|
+
//#region src/expect/type.ts
|
|
6
|
+
require_mixins.use({ type: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (type) => {
|
|
9
|
+
if (inverted) require_is_type.notIsType(value, type);
|
|
10
|
+
else require_is_type.isType(value, type);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//# sourceMappingURL=type.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.cjs","names":["use"],"sources":["../../src/expect/type.ts"],"sourcesContent":["import { notIsType, isType } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type ValueType } from '../utils/get-type.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if value is of certain type\n */\n type(type: ValueType): this;\n }\n}\n\nuse({\n type: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (type: ValueType) => {\n if (inverted) {\n notIsType(value, type);\n } else {\n isType(value, type);\n }\n }\n }\n});\n"],"mappings":";;;;;AAcAA,mBAAI,EACA,MAAM;CACF,MAAM;CACN,QACK,EAAE,OAAO,gBACT,SAAoB;AACjB,MAAI,SACA,2BAAU,OAAO,KAAK;MAEtB,wBAAO,OAAO,KAAK;;CAGlC,EACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { isType, notIsType } from "../assert/is-type.js";
|
|
2
|
+
import "../assert.js";
|
|
3
|
+
import { use } from "../mixins.js";
|
|
4
|
+
|
|
5
|
+
//#region src/expect/type.ts
|
|
6
|
+
use({ type: {
|
|
7
|
+
type: "method",
|
|
8
|
+
value: ({ value, inverted }) => (type) => {
|
|
9
|
+
if (inverted) notIsType(value, type);
|
|
10
|
+
else isType(value, type);
|
|
11
|
+
}
|
|
12
|
+
} });
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { };
|
|
16
|
+
//# sourceMappingURL=type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","names":[],"sources":["../../src/expect/type.ts"],"sourcesContent":["import { notIsType, isType } from '../assert.js';\nimport { use } from '../mixins.js';\nimport { type ValueType } from '../utils/get-type.js';\n\ndeclare module '../expect.types' {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n interface ValueExpect<T> {\n /**\n * check if value is of certain type\n */\n type(type: ValueType): this;\n }\n}\n\nuse({\n type: {\n type: 'method',\n value:\n ({ value, inverted }) =>\n (type: ValueType) => {\n if (inverted) {\n notIsType(value, type);\n } else {\n isType(value, type);\n }\n }\n }\n});\n"],"mappings":";;;;;AAcA,IAAI,EACA,MAAM;CACF,MAAM;CACN,QACK,EAAE,OAAO,gBACT,SAAoB;AACjB,MAAI,SACA,WAAU,OAAO,KAAK;MAEtB,QAAO,OAAO,KAAK;;CAGlC,EACJ,CAAC"}
|
package/dist/expect.cjs
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_mixins = require('./mixins.cjs');
|
|
3
|
+
const require_chain = require('./utils/chain.cjs');
|
|
4
|
+
const require_get_size = require('./utils/get-size.cjs');
|
|
5
|
+
require('./expect/after.cjs');
|
|
6
|
+
require('./expect/ballpark.cjs');
|
|
7
|
+
require('./expect/before.cjs');
|
|
8
|
+
require('./expect/between.cjs');
|
|
9
|
+
require('./expect/empty.cjs');
|
|
10
|
+
require('./expect/end-with.cjs');
|
|
11
|
+
require('./expect/eql.cjs');
|
|
12
|
+
require('./expect/equal-shorthand.cjs');
|
|
13
|
+
require('./expect/equal.cjs');
|
|
14
|
+
require('./expect/excluding.cjs');
|
|
15
|
+
require('./expect/greater-than-equal.cjs');
|
|
16
|
+
require('./expect/greater-than.cjs');
|
|
17
|
+
require('./expect/has-property.cjs');
|
|
18
|
+
require('./expect/include.cjs');
|
|
19
|
+
require('./expect/instance-of-shorthand.cjs');
|
|
20
|
+
require('./expect/instance-of.cjs');
|
|
21
|
+
require('./expect/keys.cjs');
|
|
22
|
+
require('./expect/length.cjs');
|
|
23
|
+
require('./expect/less-than-equal.cjs');
|
|
24
|
+
require('./expect/less-than.cjs');
|
|
25
|
+
require('./expect/match.cjs');
|
|
26
|
+
require('./expect/members.cjs');
|
|
27
|
+
require('./expect/reject.cjs');
|
|
28
|
+
require('./expect/round-to.cjs');
|
|
29
|
+
require('./expect/start-with.cjs');
|
|
30
|
+
require('./expect/throw.cjs');
|
|
31
|
+
require('./expect/type-shorthand.cjs');
|
|
32
|
+
require('./expect/type.cjs');
|
|
33
|
+
const require_fail = require('./utils/fail.cjs');
|
|
34
|
+
let lodash_mapValues_js = require("lodash/mapValues.js");
|
|
35
|
+
lodash_mapValues_js = require_rolldown_runtime.__toESM(lodash_mapValues_js);
|
|
36
|
+
|
|
37
|
+
//#region src/expect.ts
|
|
38
|
+
require_mixins.use({
|
|
39
|
+
to: {
|
|
40
|
+
type: "property",
|
|
41
|
+
value: () => null
|
|
42
|
+
},
|
|
43
|
+
be: {
|
|
44
|
+
type: "property",
|
|
45
|
+
value: () => null
|
|
46
|
+
},
|
|
47
|
+
a: {
|
|
48
|
+
type: "property",
|
|
49
|
+
value: () => null
|
|
50
|
+
},
|
|
51
|
+
an: {
|
|
52
|
+
type: "property",
|
|
53
|
+
value: () => null
|
|
54
|
+
},
|
|
55
|
+
and: {
|
|
56
|
+
type: "property",
|
|
57
|
+
value: ({ value, every,...rest }) => {
|
|
58
|
+
const values = (0, lodash_mapValues_js.default)(rest, () => {});
|
|
59
|
+
return {
|
|
60
|
+
value,
|
|
61
|
+
every,
|
|
62
|
+
...values
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
have: {
|
|
67
|
+
type: "property",
|
|
68
|
+
value: () => null
|
|
69
|
+
},
|
|
70
|
+
in: {
|
|
71
|
+
type: "property",
|
|
72
|
+
value: () => null
|
|
73
|
+
},
|
|
74
|
+
not: {
|
|
75
|
+
type: "property",
|
|
76
|
+
value: (state) => ({
|
|
77
|
+
...state,
|
|
78
|
+
inverted: !state.inverted
|
|
79
|
+
})
|
|
80
|
+
},
|
|
81
|
+
of: {
|
|
82
|
+
type: "property",
|
|
83
|
+
value: () => null
|
|
84
|
+
},
|
|
85
|
+
length: {
|
|
86
|
+
type: "property",
|
|
87
|
+
value: (state) => ({
|
|
88
|
+
...state,
|
|
89
|
+
getProperty: require_get_size.getSize
|
|
90
|
+
})
|
|
91
|
+
},
|
|
92
|
+
deep: {
|
|
93
|
+
type: "property",
|
|
94
|
+
value: (state) => ({
|
|
95
|
+
...state,
|
|
96
|
+
deep: true
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
every: {
|
|
100
|
+
type: "property",
|
|
101
|
+
value: (state) => ({
|
|
102
|
+
...state,
|
|
103
|
+
every: true
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const expectChain = (state) => {
|
|
108
|
+
const chain = {};
|
|
109
|
+
for (const [key, v] of Object.entries(require_mixins.mixins)) {
|
|
110
|
+
const definition = v.type === "alias" ? require_mixins.mixins[v.value] : v;
|
|
111
|
+
if (definition.type === "property") require_chain.registerProperty(chain, key, () => {
|
|
112
|
+
const newState = definition.value(state);
|
|
113
|
+
return expectChain({
|
|
114
|
+
...state,
|
|
115
|
+
...newState
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
else if (definition.type === "method") require_chain.registerMethod(chain, key, (...args) => {
|
|
119
|
+
if (state.getProperty) definition.value({
|
|
120
|
+
value: state.getProperty(state.value),
|
|
121
|
+
inverted: state.inverted
|
|
122
|
+
})(...args);
|
|
123
|
+
else if (state.every) for (const value of state.value) definition.value({
|
|
124
|
+
...state,
|
|
125
|
+
value
|
|
126
|
+
})(...args);
|
|
127
|
+
else {
|
|
128
|
+
const result = definition.value({ ...state })(...args);
|
|
129
|
+
if (result) return result;
|
|
130
|
+
}
|
|
131
|
+
return expectChain(state);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return chain;
|
|
135
|
+
};
|
|
136
|
+
const expect = ((actual) => {
|
|
137
|
+
return expectChain({ value: actual });
|
|
138
|
+
});
|
|
139
|
+
expect.fail = require_fail.fail;
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
142
|
+
exports.expect = expect;
|
|
143
|
+
exports.expectChain = expectChain;
|
|
144
|
+
//# sourceMappingURL=expect.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expect.cjs","names":["use","getSize","mixins","fail"],"sources":["../src/expect.ts"],"sourcesContent":["import { mixins, type State, use } from './mixins.js';\nimport { registerMethod, registerProperty } from './utils/chain.js';\nimport { getSize } from './utils/get-size.js';\nimport './expect/after.js';\nimport './expect/ballpark.js';\nimport './expect/before.js';\nimport './expect/between.js';\nimport './expect/empty.js';\nimport './expect/end-with.js';\nimport './expect/eql.js';\nimport './expect/equal-shorthand.js';\nimport './expect/equal.js';\nimport './expect/excluding.js';\nimport './expect/greater-than-equal.js';\nimport './expect/greater-than.js';\nimport './expect/has-property.js';\nimport './expect/include.js';\nimport './expect/instance-of-shorthand.js';\nimport './expect/instance-of.js';\nimport './expect/keys.js';\nimport './expect/length.js';\nimport './expect/less-than-equal.js';\nimport './expect/less-than.js';\nimport './expect/match.js';\nimport './expect/members.js';\nimport './expect/reject.js';\nimport './expect/round-to.js';\nimport './expect/start-with.js';\nimport './expect/throw.js';\nimport './expect/type-shorthand.js';\nimport './expect/type.js';\nimport mapValues from 'lodash/mapValues.js';\nimport { fail } from './utils/fail.js';\nimport { type Expect } from './expect.types.js';\n\nuse({\n to: { type: 'property', value: () => null },\n be: { type: 'property', value: () => null },\n a: { type: 'property', value: () => null },\n an: { type: 'property', value: () => null },\n and: {\n type: 'property',\n value: ({ value, every, ...rest }) => {\n const values = mapValues(rest, () => {}) as any;\n return { value, every, ...values };\n }\n },\n have: { type: 'property', value: () => null },\n in: { type: 'property', value: () => null },\n not: { type: 'property', value: (state) => ({ ...state, inverted: !state.inverted }) },\n of: { type: 'property', value: () => null },\n\n length: { type: 'property', value: (state) => ({ ...state, getProperty: getSize }) },\n deep: { type: 'property', value: (state) => ({ ...state, deep: true }) },\n\n every: { type: 'property', value: (state) => ({ ...state, every: true }) }\n});\n\nexport const expectChain = <T>(state: State<T>) => {\n const chain = {} as any;\n for (const [key, v] of Object.entries(mixins)) {\n const definition = v.type === 'alias' ? mixins[v.value] : v;\n if (definition.type === 'property') {\n registerProperty(chain, key, () => {\n const newState = definition.value(state);\n return expectChain({ ...state, ...newState });\n });\n } else if (definition.type === 'method') {\n registerMethod(chain, key, (...args: any[]) => {\n if (state.getProperty) {\n definition.value({ value: state.getProperty(state.value), inverted: state.inverted })(...args);\n } else if (state.every) {\n for (const value of state.value as any) {\n definition.value({ ...state, value })(...args);\n }\n } else {\n const result = definition.value({ ...state })(...args);\n if (result as any) {\n return result;\n }\n }\n return expectChain(state);\n });\n }\n }\n return chain;\n};\n\nexport const expect = (<T>(actual: T) => {\n return expectChain({ value: actual });\n}) as Expect;\n\nexpect.fail = fail;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCAA,mBAAI;CACA,IAAI;EAAE,MAAM;EAAY,aAAa;EAAM;CAC3C,IAAI;EAAE,MAAM;EAAY,aAAa;EAAM;CAC3C,GAAG;EAAE,MAAM;EAAY,aAAa;EAAM;CAC1C,IAAI;EAAE,MAAM;EAAY,aAAa;EAAM;CAC3C,KAAK;EACD,MAAM;EACN,QAAQ,EAAE,OAAO,MAAO,GAAG,WAAW;GAClC,MAAM,0CAAmB,YAAY,GAAG;AACxC,UAAO;IAAE;IAAO;IAAO,GAAG;IAAQ;;EAEzC;CACD,MAAM;EAAE,MAAM;EAAY,aAAa;EAAM;CAC7C,IAAI;EAAE,MAAM;EAAY,aAAa;EAAM;CAC3C,KAAK;EAAE,MAAM;EAAY,QAAQ,WAAW;GAAE,GAAG;GAAO,UAAU,CAAC,MAAM;GAAU;EAAG;CACtF,IAAI;EAAE,MAAM;EAAY,aAAa;EAAM;CAE3C,QAAQ;EAAE,MAAM;EAAY,QAAQ,WAAW;GAAE,GAAG;GAAO,aAAaC;GAAS;EAAG;CACpF,MAAM;EAAE,MAAM;EAAY,QAAQ,WAAW;GAAE,GAAG;GAAO,MAAM;GAAM;EAAG;CAExE,OAAO;EAAE,MAAM;EAAY,QAAQ,WAAW;GAAE,GAAG;GAAO,OAAO;GAAM;EAAG;CAC7E,CAAC;AAEF,MAAa,eAAkB,UAAoB;CAC/C,MAAM,QAAQ,EAAE;AAChB,MAAK,MAAM,CAAC,KAAK,MAAM,OAAO,QAAQC,sBAAO,EAAE;EAC3C,MAAM,aAAa,EAAE,SAAS,UAAUA,sBAAO,EAAE,SAAS;AAC1D,MAAI,WAAW,SAAS,WACpB,gCAAiB,OAAO,WAAW;GAC/B,MAAM,WAAW,WAAW,MAAM,MAAM;AACxC,UAAO,YAAY;IAAE,GAAG;IAAO,GAAG;IAAU,CAAC;IAC/C;WACK,WAAW,SAAS,SAC3B,8BAAe,OAAO,MAAM,GAAG,SAAgB;AAC3C,OAAI,MAAM,YACN,YAAW,MAAM;IAAE,OAAO,MAAM,YAAY,MAAM,MAAM;IAAE,UAAU,MAAM;IAAU,CAAC,CAAC,GAAG,KAAK;YACvF,MAAM,MACb,MAAK,MAAM,SAAS,MAAM,MACtB,YAAW,MAAM;IAAE,GAAG;IAAO;IAAO,CAAC,CAAC,GAAG,KAAK;QAE/C;IACH,MAAM,SAAS,WAAW,MAAM,EAAE,GAAG,OAAO,CAAC,CAAC,GAAG,KAAK;AACtD,QAAI,OACA,QAAO;;AAGf,UAAO,YAAY,MAAM;IAC3B;;AAGV,QAAO;;AAGX,MAAa,WAAc,WAAc;AACrC,QAAO,YAAY,EAAE,OAAO,QAAQ,CAAC;;AAGzC,OAAO,OAAOC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { State } from "./mixins.cjs";
|
|
2
|
+
import { Expect } from "./expect.types.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/expect.d.ts
|
|
5
|
+
|
|
6
|
+
declare const expectChain: <T>(state: State<T>) => any;
|
|
7
|
+
declare const expect: Expect;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { expect, expectChain };
|
|
10
|
+
//# sourceMappingURL=expect.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expect.d.cts","names":[],"sources":["../src/expect.ts"],"sourcesContent":[],"mappings":";;;;;cA0Da,wBAAyB,MAAM;cA8B/B,QAEP"}
|
package/dist/expect.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { State } from "./mixins.js";
|
|
2
|
+
import { Expect } from "./expect.types.js";
|
|
3
|
+
|
|
4
|
+
//#region src/expect.d.ts
|
|
5
|
+
|
|
6
|
+
declare const expectChain: <T>(state: State<T>) => any;
|
|
7
|
+
declare const expect: Expect;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { expect, expectChain };
|
|
10
|
+
//# sourceMappingURL=expect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expect.d.ts","names":[],"sources":["../src/expect.ts"],"sourcesContent":[],"mappings":";;;;;cA0Da,wBAAyB,MAAM;cA8B/B,QAEP"}
|