forked from openiap/opencore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-cli.test.ts
More file actions
38 lines (36 loc) · 1.14 KB
/
Copy pathrun-cli.test.ts
File metadata and controls
38 lines (36 loc) · 1.14 KB
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
37
38
const path = require("path");
const fs = require('fs');
const pako = require('pako');
const env = path.join(process.cwd(), 'config', '.env');
require("dotenv").config({ path: env }); // , debug: false
import { suite, test, timeout } from '@testdeck/mocha';
import { Config } from "../OpenFlow/src/Config";
import assert = require('assert');
import { Logger } from '../OpenFlow/src/Logger';
import { NoderedUtil, User } from '@openiap/openflow-api';
import { Crypt } from '../OpenFlow/src/Crypt';
@suite class run_cli_test {
private rootToken: string;
private testUser: User;
private userToken: string;
@timeout(10000)
async before() {
Config.disablelogging();
Logger.configure(true, true);
}
@timeout(10000)
async after() {
Config.workitem_queue_monitoring_enabled = false;
await Logger.shutdown();
// wtf.dump();
}
@timeout(5000)
@test 'Include cli'() {
require('../OpenFlow/src/cli');
}
// @timeout(5000)
// @test 'Include nodered cli'() {
// require('../OpenFlowNodeRED/src/cli');
// }
}
// cls | ./node_modules/.bin/_mocha 'test/**/run-cli.test.ts'