Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
textlint-tester
Advanced tools
Mocha test helper library for textlint rule.
npm install -D textlint-tester
textlint-tester
{string} ruleName
ruleName is name of thee rule{Function} rule
rule is the function of rule{string[]|object[]} valid
["text", { text : "text" }]
{object[]} invalid
[{text: "text", errors: [ messages : "expected message" ]}
var TextLintTester = require("textlint-tester");
// rules
var noTodo = require("textlint-rule-no-todo");
var maxNumberOfLine = require("textlint-rule-max-number-of-lines");
var tester = new TextLintTester();
// ruleName, rule, expected[]
tester.run("no-todo", noTodo, {
valid: [
"string, test desu",
{
text: "日本語 is Japanese."
}
],
invalid: [
// text, expected errors
{
text: "- [ ] string",
errors: [
{message: "found TODO: '- [ ] string'"}
]
},
{
text: "TODO: string",
errors: [
{
message: "found TODO: 'TODO: string'",
line: 1,
column: 1
}
]
}
]
});
mocha test/
# npm test
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT
FAQs
testing tool for textlint rule.
The npm package textlint-tester receives a total of 17,169 weekly downloads. As such, textlint-tester popularity was classified as popular.
We found that textlint-tester demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.