Add field test
This commit is contained in:
parent
78ea179c46
commit
180cd0cc6e
18
test/field.test.js
Normal file
18
test/field.test.js
Normal file
@ -0,0 +1,18 @@
|
||||
var assert = require('assert');
|
||||
var tree = require('../lib/carto/tree.js');
|
||||
require('../lib/carto/tree/field');
|
||||
|
||||
describe('Field', function() {
|
||||
describe('basic functionality', function() {
|
||||
it('should be constructed', function() {
|
||||
var f = new tree.Field("foo");
|
||||
assert.ok(f);
|
||||
assert.equal(f.is, 'field');
|
||||
});
|
||||
it('should produce xml-friendly output', function() {
|
||||
var f = new tree.Field("bar");
|
||||
assert.ok(f);
|
||||
assert.equal(f.toString(), "[bar]");
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue
Block a user