Ai
3 Star 6 Fork 0

Gitee 极速下载/codepilot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/CodePilotai/codepilot
克隆/下载
_split-test.unit.js 744 Bytes
一键复制 编辑 原始数据 按行查看 历史
petebytes 提交于 2018-11-02 01:07 +08:00 . Initial MIT release v5.0.0
import splitTest from './_split-test'
describe('@split-tests/_split-test', () => {
it('works correctly with an array of string hypotheses', () => {
const config = {
key: 'foo',
hypotheses: ['bar', 'baz']
}
const hypothesis = splitTest(config)
expect(config.hypotheses).toContain(hypothesis.name)
expect(config.hypotheses).toContain(hypothesis.value)
})
it('works correctly with object hypotheses', () => {
const config = {
key: 'foo',
hypotheses: {
a: 'b',
c: 'd'
}
}
const hypothesis = splitTest(config)
expect(Object.keys(config.hypotheses)).toContain(hypothesis.name)
expect(Object.values(config.hypotheses)).toContain(hypothesis.value)
})
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/codepilot.git
git@gitee.com:mirrors/codepilot.git
mirrors
codepilot
codepilot
master

搜索帮助