Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMike Gerwitz <gerwitm@lovullo.com>2016-06-22 15:59:12 -0400
committerMike Gerwitz <gerwitm@lovullo.com>2016-06-22 15:59:12 -0400
commitd6cecf1ff6d086dcdb2773a232faefcdc1195e04 (patch)
tree3f8e03c64f8fc9ccb72135ed9d66410937bac97c /test
parenta509e53a3e3216acb0e78a1c4abe35c7dade8914 (diff)
downloadliza-d6cecf1ff6d086dcdb2773a232faefcdc1195e04.tar.gz
liza-d6cecf1ff6d086dcdb2773a232faefcdc1195e04.tar.bz2
liza-d6cecf1ff6d086dcdb2773a232faefcdc1195e04.zip
VFormat => PatternFormatter with added interface
* src/validate/ValidatorFormatter.js: Interface added. * src/validate/formatter/PatternFormatter.js: Renamed from ../VFormat.js. * test/validate/formatter/PatternFormatterTest.js: Renamed from ../VFormatTest.js.
Diffstat (limited to 'test')
-rw-r--r--test/validate/formatter/PatternFormatterTest.js (renamed from test/validate/VFormatTest.js)17
1 files changed, 13 insertions, 4 deletions
diff --git a/test/validate/VFormatTest.js b/test/validate/formatter/PatternFormatterTest.js
index 160822e..749d428 100644
--- a/test/validate/VFormatTest.js
+++ b/test/validate/formatter/PatternFormatterTest.js
@@ -1,5 +1,5 @@
/**
- * Test validator-formatter
+ * Test pattern-based validator-formatter
*
* Copyright (C) 2016 LoVullo Associates, Inc.
*
@@ -19,8 +19,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-var liza = require( '../../' ),
- Sut = liza.validate.VFormat,
+var liza = require( '../../../' ),
+ Sut = liza.validate.formatter.PatternFormatter,
+ VFmt = liza.validate.ValidatorFormatter,
+ Class = require( 'easejs' ).Class,
expect = require( 'chai' ).expect,
assert = require( 'assert' ),
dfn = [
@@ -30,8 +32,15 @@ var liza = require( '../../' ),
];
-describe( 'VFormat', function()
+describe( 'PatternFormatter', function()
{
+ it( 'is a ValidatorFormatter', function()
+ {
+ expect( Class.isA( VFmt, createSut( [] ) ) )
+ .to.be.true;
+ } );
+
+
describe( '#parse', function()
{
it( 'formats string according to given definition', function()