carto/test/field.test.js

19 lines
568 B
JavaScript
Raw Normal View History

2014-06-11 23:52:06 +08:00
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]");
});
});
});