@18ys/god
Version:
prefer to a global Object that can set some data to it, because vue3 don't have the global Object Vue.
14 lines (13 loc) • 459 B
JavaScript
const { expect } = require('chai');
const { give, ask } = require('../dist/god');
describe('test give function of god', function() {
it('give key', function() {
expect(ask('text')).to.be.equal(null);
give('text', 'give is ok?', { readonly: true });
expect(ask('text')).to.be.equal('give is ok?');
})
it('give readonly key', function() {
give('text', 'readonly could change?');
expect(ask('text')).to.be.equal('give is ok?');
})
})