mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test(route) no index
This commit is contained in:
parent
b1bb35bfd9
commit
178446a8b3
1 changed files with 2 additions and 3 deletions
|
|
@ -181,15 +181,14 @@ test('cloudcmd: route: keys panel', (t) => {
|
|||
});
|
||||
|
||||
test('cloudcmd: route: no index', (t) => {
|
||||
const name = path.join(__dirname, '../../dist/index.html');
|
||||
const nameAfter = path.join(__dirname, '../../dist/index1.html');
|
||||
const name = path.join(__dirname, '../../dist-dev/index.html');
|
||||
const nameAfter = path.join(__dirname, '../../dist-dev/index1.html');
|
||||
|
||||
fs.renameSync(name, nameAfter);
|
||||
|
||||
before({}, (port, after) => {
|
||||
getStr(`http://localhost:${port}/`)
|
||||
.then((result) => {
|
||||
console.log(result);
|
||||
fs.renameSync(nameAfter, name);
|
||||
t.equal(result.indexOf('ENOENT'), 0, 'should not found index.html');
|
||||
t.end();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue