test.js 203 B

123456789101112
  1. var tape = require('tape')
  2. var gen = require('./')
  3. tape('valid', function(t) {
  4. t.same(gen('a', 'b'), 'a.b')
  5. t.end()
  6. })
  7. tape('invalid', function(t) {
  8. t.same(gen('a', '-b'), 'a["-b"]')
  9. t.end()
  10. })