diff options
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/key_spec.moon | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/key_spec.moon b/spec/key_spec.moon index 9b7dde4..edd5ccf 100644 --- a/spec/key_spec.moon +++ b/spec/key_spec.moon @@ -56,3 +56,13 @@ describe "Key", -> assert.is.equal 'facet: and -> long -> type', tostring Key 'facet: and -> long -> type' assert.is.equal 'facet: and -> long -> type', tostring Key 'facet', 'and -> long -> type' assert.is.equal 'facet: and -> long -> type', tostring Key 'facet: and -> long -> type' + + it ":tostring formats the key", -> + assert.is.equal 'type/only', (Key 'type/only')\tostring! + assert.is.equal 'type/only', (Key '', 'type/only')\tostring! + assert.is.equal 'type/only', (Key ": type/only")\tostring! + + it ":tostring supports strict mode", -> + assert.is.equal ': type/only', (Key 'type/only')\tostring true + assert.is.equal ': type/only', (Key '', 'type/only')\tostring true + assert.is.equal ': type/only', (Key ": type/only")\tostring true |
