forked from google/clasp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifest.ts
36 lines (32 loc) · 1.08 KB
/
manifest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {expect} from 'chai';
import {after, before, describe, it} from 'mocha';
import {getManifest, isValidManifest, isValidRunManifest} from '../src/manifest';
import {cleanup, setup, setupWithRunManifest} from './functions';
describe('Test getManifest function', () => {
before(setup);
it('should get a valid manifest file correctly', async () => {
const manifest = await getManifest();
expect(manifest.timeZone).to.equal('America/Los_Angeles');
});
after(cleanup);
});
describe('Test isValidRunManifest function', () => {
it('should validate a manifest with run permissions', async () => {
setupWithRunManifest();
expect(await isValidRunManifest()).to.equal(true);
cleanup();
});
it('should not validate a manifest with run permissions', async () => {
setup();
expect(await isValidRunManifest()).to.equal(false);
cleanup();
});
after(cleanup);
});
describe('Test isValidManifest function', () => {
before(setup);
it('should validate a manifest', async () => {
expect(await isValidManifest()).to.equal(true);
});
after(cleanup);
});