Updated test
This commit is contained in:
@ -1,85 +1,85 @@
|
||||
'use strict'
|
||||
|
||||
// import { test } from 'tap'
|
||||
// /* eslint-disable no-unused-vars */
|
||||
// import * as types from '../../dsl/lib/types'
|
||||
// /* eslint-enable no-unused-vars */
|
||||
// import { F, Q } from '../../dsl'
|
||||
import { test } from 'tap'
|
||||
/* eslint-disable no-unused-vars */
|
||||
import * as types from '../../dsl/lib/types'
|
||||
/* eslint-enable no-unused-vars */
|
||||
import { F, Q } from '../../dsl'
|
||||
|
||||
// test('match', t => {
|
||||
// t.deepEqual(F()
|
||||
// .match('foo', 'bar')
|
||||
// .match('foo', 'baz')
|
||||
// .build(),
|
||||
// Q(
|
||||
// Q.match('foo', 'bar'),
|
||||
// Q.match('foo', 'baz')
|
||||
// )
|
||||
// )
|
||||
test('match', t => {
|
||||
t.deepEqual(F()
|
||||
.match('foo', 'bar')
|
||||
.match('foo', 'baz')
|
||||
.build(),
|
||||
Q(
|
||||
Q.match('foo', 'bar'),
|
||||
Q.match('foo', 'baz')
|
||||
)
|
||||
)
|
||||
|
||||
// t.deepEqual(F()
|
||||
// .match('foo', ['bar', 'baz'])
|
||||
// .build(),
|
||||
// Q(
|
||||
// Q.match('foo', ['bar', 'baz'])
|
||||
// )
|
||||
// )
|
||||
t.deepEqual(F()
|
||||
.match('foo', ['bar', 'baz'])
|
||||
.build(),
|
||||
Q(
|
||||
Q.match('foo', ['bar', 'baz'])
|
||||
)
|
||||
)
|
||||
|
||||
// t.end()
|
||||
// })
|
||||
t.end()
|
||||
})
|
||||
|
||||
// test('matchPhrase', t => {
|
||||
// t.deepEqual(F()
|
||||
// .matchPhrase('foo', 'bar')
|
||||
// .build(),
|
||||
// Q(Q.matchPhrase('foo', 'bar'))
|
||||
// )
|
||||
test('matchPhrase', t => {
|
||||
t.deepEqual(F()
|
||||
.matchPhrase('foo', 'bar')
|
||||
.build(),
|
||||
Q(Q.matchPhrase('foo', 'bar'))
|
||||
)
|
||||
|
||||
// t.end()
|
||||
// })
|
||||
t.end()
|
||||
})
|
||||
|
||||
// test('matchPhrasePrefix', t => {
|
||||
// t.deepEqual(F()
|
||||
// .matchPhrasePrefix('foo', 'bar')
|
||||
// .build(),
|
||||
// Q(Q.matchPhrasePrefix('foo', 'bar'))
|
||||
// )
|
||||
test('matchPhrasePrefix', t => {
|
||||
t.deepEqual(F()
|
||||
.matchPhrasePrefix('foo', 'bar')
|
||||
.build(),
|
||||
Q(Q.matchPhrasePrefix('foo', 'bar'))
|
||||
)
|
||||
|
||||
// t.end()
|
||||
// })
|
||||
t.end()
|
||||
})
|
||||
|
||||
// test('multiMatch', t => {
|
||||
// t.deepEqual(F()
|
||||
// .multiMatch(['foo1', 'foo2'], 'bar')
|
||||
// .build(),
|
||||
// Q(Q.multiMatch(['foo1', 'foo2'], 'bar'))
|
||||
// )
|
||||
test('multiMatch', t => {
|
||||
t.deepEqual(F()
|
||||
.multiMatch(['foo1', 'foo2'], 'bar')
|
||||
.build(),
|
||||
Q(Q.multiMatch(['foo1', 'foo2'], 'bar'))
|
||||
)
|
||||
|
||||
// t.end()
|
||||
// })
|
||||
t.end()
|
||||
})
|
||||
|
||||
// test('matchAll', t => {
|
||||
// t.deepEqual(F()
|
||||
// .matchAll()
|
||||
// .build(),
|
||||
// Q(Q.matchAll())
|
||||
// )
|
||||
test('matchAll', t => {
|
||||
t.deepEqual(F()
|
||||
.matchAll()
|
||||
.build(),
|
||||
Q(Q.matchAll())
|
||||
)
|
||||
|
||||
// t.deepEqual(F()
|
||||
// .matchAll({ boost: 1 })
|
||||
// .build(),
|
||||
// Q(Q.matchAll({ boost: 1 }))
|
||||
// )
|
||||
t.deepEqual(F()
|
||||
.matchAll({ boost: 1 })
|
||||
.build(),
|
||||
Q(Q.matchAll({ boost: 1 }))
|
||||
)
|
||||
|
||||
// t.end()
|
||||
// })
|
||||
t.end()
|
||||
})
|
||||
|
||||
// test('matchNone', t => {
|
||||
// t.deepEqual(F()
|
||||
// .matchNone()
|
||||
// .build(),
|
||||
// Q(Q.matchNone())
|
||||
// )
|
||||
test('matchNone', t => {
|
||||
t.deepEqual(F()
|
||||
.matchNone()
|
||||
.build(),
|
||||
Q(Q.matchNone())
|
||||
)
|
||||
|
||||
// t.end()
|
||||
// })
|
||||
t.end()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user