Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert var to const/let in the test/unit folder #12528

Merged
merged 3 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/unit/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": [
"../.eslintrc"
],

"rules": {
// ECMAScript 6
"no-var": "error",
},
}
273 changes: 148 additions & 125 deletions test/unit/api_spec.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions test/unit/bidi_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ import { bidi } from "../../src/core/bidi.js";
describe("bidi", function () {
it("should mark text as RTL if more than 30% of text is RTL", function () {
// 33% of test text are RTL characters
var test = "\u0645\u0635\u0631 Egypt";
var result = "Egypt \u0631\u0635\u0645";
var bidiText = bidi(test, -1, false);
const test = "\u0645\u0635\u0631 Egypt";
const result = "Egypt \u0631\u0635\u0645";
const bidiText = bidi(test, -1, false);

expect(bidiText.str).toEqual(result);
expect(bidiText.dir).toEqual("rtl");
});

it("should mark text as LTR if less than 30% of text is RTL", function () {
var test = "Egypt is known as \u0645\u0635\u0631 in Arabic.";
var result = "Egypt is known as \u0631\u0635\u0645 in Arabic.";
var bidiText = bidi(test, -1, false);
const test = "Egypt is known as \u0645\u0635\u0631 in Arabic.";
const result = "Egypt is known as \u0631\u0635\u0645 in Arabic.";
const bidiText = bidi(test, -1, false);

expect(bidiText.str).toEqual(result);
expect(bidiText.dir).toEqual("ltr");
Expand Down
Loading