const TextLintTester = require("textlint-tester");
const tester = new TextLintTester();
// rule
const rule = require("../src/textlint-rule-google-tone");
// ruleName, rule, { valid, invalid }
const message = `using "please" in a set of instructions is overdoing the politeness.\n
        URL: https://developers.google.com/style/tone#politeness-and-use-of-please`;
tester.run("textlint-rule-google-tone", rule, {
    valid: ["To view the document, click View."],
    invalid: [
        {
            text: "To view the document, please click View.",
            output: "To view the document, click View.",
            errors: [
                {
                    message: message,
                    index: 0
                }
            ],
        },
        {
            text: "For more information, please see document.",
            output: "For more information, see document.",
            errors: [
                {
                    message: message,
                    index: 0
                }
            ],
        }

    ]
});

@@ -418,16 +418,25 @@
 valid: %5B
+%0A        
 %22To view
@@ -462,16 +462,156 @@
 k View.%22
+,%0A        %22To get the user's phone number, call %60user.phoneNumber.get()%60.%22,%0A        %22To clean up, call the %60collectGarbage()%60 method.%22,%0A    
 %5D,%0A    i

add test case