kubernetes-handbook/node_modules/generate-object-property/test.js

12 lines
203 B
JavaScript
Raw Normal View History

2021-04-13 00:24:28 +08:00
var tape = require('tape')
var gen = require('./')
tape('valid', function(t) {
t.same(gen('a', 'b'), 'a.b')
t.end()
})
tape('invalid', function(t) {
t.same(gen('a', '-b'), 'a["-b"]')
t.end()
})