@botphus/rule

Testing Rule management lib for botphus

Usage no npm install needed!

<script type="module">
  import botphusRule from 'https://cdn.skypack.dev/@botphus/rule';
</script>

README

@botphus/rule

@botphus/rulebotphus的核心测试规则程序,提供web测试单元任务验证.

build status codecov.io node version

索引

快速使用

安装

npm install @botphus/rule --save

构建

npm run build

使用

import BotphusRule, {TaskType, TaskTypeDomSubType} from '@botphus/rule';
const botphusRule = new BotphusRule();
botphusRule.validRule([
    {
        argments: ['div'],
        assertion: ['data === "wrong assertion rule"'],
        subType: TaskTypeDomSubType.SUB_TYPE_GET_TEXT,
        type: TaskType.TYPE_DOM
    }
])
    .catch((err) => {
        console.log(err);
    });