mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(auth) add
This commit is contained in:
parent
a2efcadd55
commit
2aadc16218
2 changed files with 30 additions and 0 deletions
|
|
@ -182,6 +182,7 @@
|
|||
"extract-text-webpack-plugin": "^4.0.0-alpha.0",
|
||||
"fast-async": "^7.0.6",
|
||||
"file-loader": "^2.0.0",
|
||||
"got": "^9.2.1",
|
||||
"gritty": "^3.0.1",
|
||||
"gunzip-maybe": "^1.3.1",
|
||||
"html-looks-like": "^1.0.2",
|
||||
|
|
|
|||
29
server/auth.spec.js
Normal file
29
server/auth.spec.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
'use strict';
|
||||
|
||||
const test = require('tape');
|
||||
const diff = require('sinon-called-with-diff');
|
||||
const sinon = diff(require('sinon'));
|
||||
const ky = require('ky');
|
||||
|
||||
const {connect} = require('../test/before');
|
||||
|
||||
const authPath = './auth';
|
||||
|
||||
test.only('config: manage: get', async (t) => {
|
||||
const auth = false;
|
||||
const config = {
|
||||
auth,
|
||||
};
|
||||
|
||||
const {done} = await connect({
|
||||
config,
|
||||
});
|
||||
|
||||
const [, result] = await ky.get('/dist/sw.js');
|
||||
|
||||
await done();
|
||||
|
||||
t.ok(result, 'should return service worker file without an auth');
|
||||
t.end();
|
||||
});
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue