carto/test/field.test.js
2012-12-19 17:34:34 -05:00

19 lines
568 B
JavaScript

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]");
});
});
});