-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add an api that gives higher priority options
- Loading branch information
Toshiya Saito
committed
Oct 30, 2023
1 parent
644652d
commit 631d9c1
Showing
8 changed files
with
2,748 additions
and
903 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import test from 'ava' | ||
|
||
import { sum } from '../index.js' | ||
import { runfmtWithSettings } from '../index.js' | ||
|
||
test('sum from native', (t) => { | ||
t.is(sum(1, 2), 3) | ||
test('format with settings', (t) => { | ||
const src = 'select A from B' | ||
const settings = { | ||
keyword_case: 'upper', | ||
identifier_case: 'lower', | ||
complement_alias: false, | ||
} | ||
const dst = runfmtWithSettings(src, JSON.stringify(settings), null) | ||
t.is(dst, 'SELECT\n\ta\nFROM\n\tb\n') | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.