Skip to content

Commit bbfc8f6

Browse files
committed
test(textlint): fix plugin tests
1 parent f362257 commit bbfc8f6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/textlint/test/pluguins/PluginOption-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { createPluginStub } from "./fixtures/example-plugin";
77
describe("plugin-option", () => {
88
it("should load plugin options if match ext", () => {
99
const textlintCore = new TextLintCore();
10-
const { getPlugin, getOptions } = createPluginStub();
10+
const { plugin, getOptions } = createPluginStub();
1111
const expectedOptions = { test: "expected" };
12-
textlintCore.setupPlugins({ example: getPlugin() }, { example: expectedOptions });
12+
textlintCore.setupPlugins({ example: plugin }, { example: expectedOptions });
1313
textlintCore.setupRules({ "example-rule": require("./fixtures/example-rule") });
1414
return textlintCore.lintText("test", ".example").then(results => {
1515
const actualOptions = getOptions();
@@ -18,9 +18,9 @@ describe("plugin-option", () => {
1818
});
1919
it("should load plugin options when does't match any ext for instance availableExtensions()", () => {
2020
const textlintCore = new TextLintCore();
21-
const { getPlugin, getOptions } = createPluginStub();
21+
const { plugin, getOptions } = createPluginStub();
2222
const expectedOptions = { test: "expected" };
23-
textlintCore.setupPlugins({ example: getPlugin() }, { example: expectedOptions });
23+
textlintCore.setupPlugins({ example: plugin }, { example: expectedOptions });
2424
textlintCore.setupRules({ "example-rule": require("./fixtures/example-rule") });
2525
// .md is built-in
2626
return textlintCore.lintText("test", ".md").then(results => {

packages/textlint/test/pluguins/fixtures/example-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const createPluginStub = () => {
4343
getOptions() {
4444
return assignedOptions;
4545
},
46-
createPlugin() {
46+
get plugin() {
4747
return {
4848
Processor: class MockProcessor extends ExampleProcessor {
4949
constructor(options) {

0 commit comments

Comments
 (0)