mirror of
https://github.com/thangisme/notes.git
synced 2026-06-14 02:19:23 -04:00
Initial commit
This commit is contained in:
32
node_modules/normalize-package-data/test/mixedcase-names.js
generated
vendored
Normal file
32
node_modules/normalize-package-data/test/mixedcase-names.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
var test = require('tap').test
|
||||
|
||||
var normalize = require('../')
|
||||
var fixer = normalize.fixer
|
||||
|
||||
test('mixedcase', function (t) {
|
||||
t.doesNotThrow(function () {
|
||||
fixer.fixNameField({name: 'foo'}, true)
|
||||
})
|
||||
|
||||
t.doesNotThrow(function () {
|
||||
fixer.fixNameField({name: 'foo'}, false)
|
||||
})
|
||||
|
||||
t.doesNotThrow(function () {
|
||||
fixer.fixNameField({name: 'foo'})
|
||||
})
|
||||
|
||||
t.throws(function () {
|
||||
fixer.fixNameField({name: 'Foo'}, true)
|
||||
}, new Error('Invalid name: "Foo"'), 'should throw an error')
|
||||
|
||||
t.throws(function () {
|
||||
fixer.fixNameField({name: 'Foo'}, {strict: true})
|
||||
}, new Error('Invalid name: "Foo"'), 'should throw an error')
|
||||
|
||||
t.doesNotThrow(function () {
|
||||
fixer.fixNameField({name: 'Foo'}, {strict: true, allowLegacyCase: true})
|
||||
})
|
||||
|
||||
t.end()
|
||||
})
|
||||
Reference in New Issue
Block a user