File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 3
3
import { assertArrayIncludes } from "@std/assert/array-includes" ;
4
4
import { number } from "./number.ts" ;
5
5
import { translate } from "./translator.ts" ;
6
+ import { assert } from "@std/assert/assert" ;
6
7
7
8
Deno . test ( "verb with adverb" , ( ) => {
8
9
const translations = translate ( "mi toki pona" ) . collect ( ) ;
@@ -12,6 +13,19 @@ Deno.test("adjective with adverb", () => {
12
13
const translations = translate ( "pona ike" ) . collect ( ) ;
13
14
assertArrayIncludes ( translations , [ "Badly good" ] ) ;
14
15
} ) ;
16
+ Deno . test ( "no ignored adverb with compound adjective" , ( ) => {
17
+ const translations = translate ( "ona li palisa pona" ) . collect ( ) ;
18
+ const incorrectTranslations = [
19
+ "They are long and hard" ,
20
+ "They are hard and long" ,
21
+ ] ;
22
+ for ( const translation of translations ) {
23
+ assert (
24
+ ! incorrectTranslations . includes ( translation ) ,
25
+ `Error at ${ translation } ` ,
26
+ ) ;
27
+ }
28
+ } ) ;
15
29
Deno . test ( "numeral translation" , ( ) => {
16
30
const NUMBER_TESTS = new Map ( Object . entries ( {
17
31
"tu tu tu wan" : 7 ,
You can’t perform that action at this time.
0 commit comments