Sha256: 8c9e14bd85d0207d802fe0b0448e77cb57d8c7adf57c22e3c451ae125517c06f
Contents?: true
Size: 768 Bytes
Versions: 7
Compression:
Stored size: 768 Bytes
Contents
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() })
Version data entries
7 entries across 6 versions & 3 rubygems