Ai
2 Star 0 Fork 0

mirrors_WebReflection/node-strings

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.js 607 Bytes
一键复制 编辑 原始数据 按行查看 历史
Andrea Giammarchi 提交于 2016-09-07 22:57 +08:00 . it's happening
var module = require('./index.js');
console.log('Testing all keys'.bold().green().underline());
console.log('');
Object.keys(module).forEach(function (key) {
if (!module[key].boundaries) return;
var randomString = Math.random().toString();
console.assert(
module[key](randomString) ===
(
module[key].boundaries[0] +
randomString +
module[key].boundaries[1]
)
);
console.log('OK'[key]() + ': ' + key);
});
console.assert(module.clean('test'.bold().red().underline()) === 'test');
console.log('OK: clean');
console.log('');
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_WebReflection/node-strings.git
git@gitee.com:mirrors_WebReflection/node-strings.git
mirrors_WebReflection
node-strings
node-strings
master

搜索帮助