mirror of
https://github.com/flynx/object.js.git
synced 2025-10-30 02:50:10 +00:00
started testing text util functions...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
35eea57ab9
commit
3c3b5b30ca
@ -28,6 +28,6 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"c8": "^7.3.0",
|
"c8": "^7.3.0",
|
||||||
"colors": "^1.4.0",
|
"colors": "^1.4.0",
|
||||||
"ig-test": "^1.3.8"
|
"ig-test": "^1.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
test.js
17
test.js
@ -671,6 +671,23 @@ var cases = test.Cases({
|
|||||||
assert(typeof(xx.call) == 'function', 'xx.call is a function')
|
assert(typeof(xx.call) == 'function', 'xx.call is a function')
|
||||||
assert(xx.call(null), 'xx.call(null)')
|
assert(xx.call(null), 'xx.call(null)')
|
||||||
},
|
},
|
||||||
|
|
||||||
|
text_cases: [
|
||||||
|
[`a
|
||||||
|
b
|
||||||
|
c`,
|
||||||
|
'a\n\tb\nc'],
|
||||||
|
[`a
|
||||||
|
b
|
||||||
|
c`,
|
||||||
|
'a\n\tb\n\tc'],
|
||||||
|
],
|
||||||
|
text: function(assert){
|
||||||
|
this.text_cases.map(function([orig, target]){
|
||||||
|
assert(object.doc([orig]) == target)
|
||||||
|
assert(object.text([orig]) == target)
|
||||||
|
})
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user