2
0
mirror of https://github.com/frappe/books.git synced 2025-02-03 04:28:32 +00:00
books/frappe/tests/test_meta.js

21 lines
536 B
JavaScript
Raw Normal View History

2018-01-01 14:57:59 +05:30
const assert = require('assert');
const frappe = require('frappe-core');
describe('Meta', () => {
before(function() {
frappe.init();
});
it('should get init from json file', () => {
let todo = frappe.get_meta('ToDo');
assert.equal(todo.issingle, 0);
});
it('should get fields from meta', () => {
let todo = frappe.get_meta('ToDo');
let fields = todo.fields.map((df) => df.fieldname);
assert.ok(fields.includes('subject'));
assert.ok(fields.includes('description'));
assert.ok(fields.includes('status'));
});
});