Skip to content

Commit

Permalink
test: ✅ adjust test values for getPhysicalDirection
Browse files Browse the repository at this point in the history
  • Loading branch information
DerZade authored Sep 5, 2023
1 parent af69db9 commit ac2cad8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/getPhysicalDirection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ describe('getPhysicalDirection', () => {
it('should return the correct directions on LTR pages', async () => {
const page = getPage();

// see https://drafts.csswg.org/css-writing-modes/#logical-to-physical
const CASES = [
{
id: 'my-elem-h-tb',
Expand All @@ -19,7 +20,7 @@ describe('getPhysicalDirection', () => {
{ id: 'my-elem-v-lr', expected: ['top', 'bottom', 'left', 'right'] }
// TODO: uncomment once chrome supports writing-mode sideways-rl / sideways-lr
// { id: 'my-elem-s-rl', expected: ['top', 'bottom', 'right', 'left'] },
// { id: 'my-elem-s-lr', expected: ['top', 'bottom', 'left', 'right'] }
// { id: 'my-elem-s-lr', expected: ['bottom', 'top', 'left', 'right'] }
];

const promises = CASES.map(({ id, expected }) =>
Expand Down Expand Up @@ -55,6 +56,7 @@ describe('getPhysicalDirection', () => {
document.dir = 'rtl';
});

// see https://drafts.csswg.org/css-writing-modes/#logical-to-physical
const CASES = [
{
id: 'my-elem-h-tb',
Expand All @@ -67,7 +69,7 @@ describe('getPhysicalDirection', () => {
{ id: 'my-elem-v-lr', expected: ['bottom', 'top', 'left', 'right'] }
// TODO: uncomment once chrome supports writing-mode sideways-rl / sideways-lr
// { id: 'my-elem-s-rl', expected: ['bottom', 'top', 'right', 'left'] },
// { id: 'my-elem-s-lr', expected: ['bottom', 'top', 'left', 'right'] }
// { id: 'my-elem-s-lr', expected: ['top', 'bottom', 'left', 'right'] }
];

const promises = CASES.map(({ id, expected }) =>
Expand Down

0 comments on commit ac2cad8

Please sign in to comment.