textlint-tester
Advanced tools
Comparing version
@@ -6,2 +6,8 @@ # Change Log | ||
<a name="2.2.2"></a> | ||
## [2.2.2](https://github.com/textlint/textlint/compare/textlint-tester@2.2.1...textlint-tester@2.2.2) (2017-05-18) | ||
<a name="2.2.1"></a> | ||
@@ -8,0 +14,0 @@ ## [2.2.1](https://github.com/textlint/textlint/compare/textlint-tester@2.2.0...textlint-tester@2.2.1) (2017-05-11) |
@@ -8,2 +8,4 @@ // LICENSE : MIT | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -19,2 +21,4 @@ | ||
var _featureFlag = require("@textlint/feature-flag"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -55,4 +59,4 @@ | ||
if (_textlint._logger !== undefined) { | ||
_textlint._logger.setRunningTest(true); | ||
if ((typeof _featureFlag.coreFlags === "undefined" ? "undefined" : _typeof(_featureFlag.coreFlags)) === "object") { | ||
_featureFlag.coreFlags.runningTester = true; | ||
} | ||
@@ -59,0 +63,0 @@ } |
@@ -14,3 +14,3 @@ { | ||
}, | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "testing tool for textlint rule.", | ||
@@ -37,3 +37,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"textlint": "^8.0.1" | ||
"@textlint/feature-flag": "^1.0.1", | ||
"textlint": "^8.1.0" | ||
}, | ||
@@ -51,3 +52,3 @@ "devDependencies": { | ||
"power-assert": "^1.4.1", | ||
"textlint": "^8.0.1", | ||
"textlint": "^8.1.0", | ||
"textlint-rule-helper": "^2.0.0", | ||
@@ -54,0 +55,0 @@ "textlint-rule-max-number-of-lines": "^1.0.2", |
// LICENSE : MIT | ||
"use strict"; | ||
import assert from "assert"; | ||
import {testValid, testInvalid} from "./test-util"; | ||
import {TextLintCore, _logger} from "textlint"; | ||
import { testValid, testInvalid } from "./test-util"; | ||
import { TextLintCore } from "textlint"; | ||
import { coreFlags } from "@textlint/feature-flag"; | ||
/* eslint-disable no-invalid-this */ | ||
@@ -36,4 +37,4 @@ const describe = (typeof global.describe === "function") | ||
constructor() { | ||
if (_logger !== undefined) { | ||
_logger.setRunningTest(true); | ||
if (typeof coreFlags === "object") { | ||
coreFlags.runningTester = true; | ||
} | ||
@@ -90,3 +91,3 @@ } | ||
*/ | ||
run(ruleName, rule, {valid = [], invalid = []}) { | ||
run(ruleName, rule, { valid = [], invalid = [] }) { | ||
describe(ruleName, () => { | ||
@@ -93,0 +94,0 @@ invalid.forEach(state => { |
Sorry, the diff of this file is not supported yet
36750
2.01%346
0.87%2
100%Updated