Aktueller Stand
This commit is contained in:
12
backend/node_modules/fast-uri/test/equal.test.js
generated
vendored
12
backend/node_modules/fast-uri/test/equal.test.js
generated
vendored
@@ -1,10 +1,9 @@
|
||||
'use strict'
|
||||
|
||||
const tap = require('tap')
|
||||
const test = tap.test
|
||||
const URI = require('../')
|
||||
const test = require('tape')
|
||||
const fastURI = require('..')
|
||||
|
||||
const fn = URI.equal
|
||||
const fn = fastURI.equal
|
||||
const runTest = (t, suite) => {
|
||||
suite.forEach(s => {
|
||||
const operator = s.result ? '==' : '!='
|
||||
@@ -66,6 +65,11 @@ test('URN Equals', (t) => {
|
||||
// t.equal(URI.equal('urn:foo:a123%2C456', 'URN:FOO:a123%2c456'), true)
|
||||
|
||||
runTest(t, suite)
|
||||
|
||||
t.throws(() => {
|
||||
fn('urn:', 'urn:FOO:a123,456')
|
||||
}, 'URN without nid cannot be serialized')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user