Skip to content

Commit

Permalink
Add bidi detection test
Browse files Browse the repository at this point in the history
  • Loading branch information
afcapel committed May 16, 2023
1 parent 304426d commit a85487f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/unit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "test/unit/attachment_test"
import "test/unit/bidi_test"
import "test/unit/block_test"
import "test/unit/composition_test"
import "test/unit/document_test"
Expand Down
9 changes: 9 additions & 0 deletions src/test/unit/bidi_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { assert, test, testGroup } from "test/test_helper"
import { getDirection } from "trix/core/helpers"

testGroup("BIDI", () => {
test("detects text direction", () => {
assert.equal(getDirection("abc"), "ltr")
assert.equal(getDirection("אבג"), "rtl")
})
})

0 comments on commit a85487f

Please sign in to comment.