Files
2026-07-13 12:48:55 +08:00

15 lines
410 B
JavaScript

import test from 'tape'
import nlp from '../_lib.js'
const here = '[three/sentence-negative] '
test('sentences.toPositive', function (t) {
const doc = nlp(`do not use reverse psychology.`)
doc.sentences().toPositive()
t.equal(doc.text(), 'use reverse psychology.', here + 'neg')
doc.sentences().toNegative()
t.equal(doc.text(), 'do not use reverse psychology.', here + 'back to neg')
t.end()
})