mirror of
https://github.com/frappe/books.git
synced 2025-02-03 04:28:32 +00:00
21 lines
536 B
JavaScript
21 lines
536 B
JavaScript
|
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'));
|
||
|
});
|
||
|
});
|