Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Extra tests for numbers

  • Loading branch information...
commit 750f2908a379bdf0cb2cb83e348cfc3b20ede129 1 parent 664d8c0
@serby authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/mapped-versionator.test.js
View
15 test/mapped-versionator.test.js
@@ -25,6 +25,21 @@ describe('versionator', function() {
var mapped = versionator.createMapped({ '/js/test.js': '/js/HASH/test.js'})
mapped.versionPath('/js/test.js').should.eql('/js/HASH/test.js')
})
+
+ it('should mapped urls with numbers', function() {
+ var mapped = versionator.createMapped(
+ { '/js/1test.js': '/js/HASH/1test.js'
+ , '/js/a-1test.js': '/js/HASH/a-1test.js'
+ })
+ mapped.versionPath('/js/1test.js').should.eql('/js/HASH/1test.js')
+ mapped.versionPath('/js/a-1test.js').should.eql('/js/HASH/a-1test.js')
+ })
+
+ it('should mapped urls with hyphens', function() {
+ var mapped = versionator.createMapped({ '/js/test-bar.js': '/js/HASH/test-bar.js'})
+ mapped.versionPath('/js/test-bar.js').should.eql('/js/HASH/test-bar.js')
+ })
+
it('should accept a modified map', function() {
var mapped = versionator.createMapped({ '/js/test.js': '/js/HASH/test.js'})
mapped.modifyMap({ '/js/test.js': '/js/OTHERHASH/test.js'})
Please sign in to comment.
Something went wrong with that request. Please try again.