ynu-oa
Version:
a oa API Client for YNU
30 lines (28 loc) • 802 B
text/typescript
import { env } from 'node:process';
import * as cache from 'memory-cache';
// import { after, describe, it } from 'node:test';
import { equal, ok } from 'node:assert';
import {getToken, House} from '../src';
import 'dotenv/config'
const {
API_HOST,
API_USERNAME,
API_PASSWORD
} = env;
const options = {
host: API_HOST,
userName: API_USERNAME,
password: API_PASSWORD
};
describe('OA系统', function() {
after(() => cache.clear());
it('获取token', async () => {
// const params: UserDetailQueryParams = {
// user_name: "",
// }
// const res = await House.getUserDetail(params, options);
const res = await getToken(options)
console.log(res)
// ok(res.user_name != "")
});
});