aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/formatters/installers/oxfmt.bash1
-rw-r--r--test/formatters/samplecode/oxfmt/in.js4
-rw-r--r--test/formatters/samplecode/oxfmt/in.ts1
-rw-r--r--test/formatters/samplecode/oxfmt/out.js5
-rw-r--r--test/formatters/samplecode/oxfmt/out.ts6
5 files changed, 17 insertions, 0 deletions
diff --git a/test/formatters/installers/oxfmt.bash b/test/formatters/installers/oxfmt.bash
new file mode 100644
index 0000000..7c33fd0
--- /dev/null
+++ b/test/formatters/installers/oxfmt.bash
@@ -0,0 +1 @@
+npm install -g oxfmt
diff --git a/test/formatters/samplecode/oxfmt/in.js b/test/formatters/samplecode/oxfmt/in.js
new file mode 100644
index 0000000..fd56713
--- /dev/null
+++ b/test/formatters/samplecode/oxfmt/in.js
@@ -0,0 +1,4 @@
+function HelloWorld({greeting = "hello", greeted = '"World"', silent = false, onMouseOver,}) {
+
+ if(!greeting){return null};
+ }
diff --git a/test/formatters/samplecode/oxfmt/in.ts b/test/formatters/samplecode/oxfmt/in.ts
new file mode 100644
index 0000000..c75d40f
--- /dev/null
+++ b/test/formatters/samplecode/oxfmt/in.ts
@@ -0,0 +1 @@
+interface GreetingSettings{greeting: string; duration?: number; color?: string;}declare function greet(setting: GreetingSettings): void;
diff --git a/test/formatters/samplecode/oxfmt/out.js b/test/formatters/samplecode/oxfmt/out.js
new file mode 100644
index 0000000..ca6d896
--- /dev/null
+++ b/test/formatters/samplecode/oxfmt/out.js
@@ -0,0 +1,5 @@
+function HelloWorld({ greeting = "hello", greeted = '"World"', silent = false, onMouseOver }) {
+ if (!greeting) {
+ return null;
+ }
+}
diff --git a/test/formatters/samplecode/oxfmt/out.ts b/test/formatters/samplecode/oxfmt/out.ts
new file mode 100644
index 0000000..143b5a7
--- /dev/null
+++ b/test/formatters/samplecode/oxfmt/out.ts
@@ -0,0 +1,6 @@
+interface GreetingSettings {
+ greeting: string;
+ duration?: number;
+ color?: string;
+}
+declare function greet(setting: GreetingSettings): void;