Skip to content

Commit

Permalink
test: add tests for transformKey
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuste committed May 22, 2017
1 parent 8725f35 commit 30be7c9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/environment/transformKey.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
lib = require '../../'
{
equal
} = require 'assert'

describe 'environment', ->

describe 'transformKey', ->

before ->
@env = new lib
section1:
section11:
data: 'hi'
section1Debug:
foo: yes

it 'replaces spaces', ->
equal '__', @env.transformKey ' '

it 'maintains numbers and letters', ->
equal 'test123', @env.transformKey 'test123'

it 'replaces symbols', ->
equal '______', @env.transformKey '!@#/._'

0 comments on commit 30be7c9

Please sign in to comment.