fix(client): update middleware names of helmet.js tests

This commit is contained in:
obsessedyouth
2020-07-06 22:03:11 +01:00
parent 564d0452cd
commit 86d3bb2de8
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ To improve performance, most browsers prefetch DNS records for the links in a pa
```yml
tests:
- text: helmet.dnsPrefetchControl() middleware should be mounted correctly
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.include(data.appStack, 'dnsPrefetchControl'); assert.equal(data.headers['x-dns-prefetch-control'], 'off'); }, xhr => { throw new Error(xhr.responseText); })
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.include(data.appStack, 'xDnsPrefetchControlMiddleware'); assert.equal(data.headers['x-dns-prefetch-control'], 'off'); }, xhr => { throw new Error(xhr.responseText); })
```

View File

@ -24,7 +24,7 @@ Use <code>helmet.frameguard()</code> passing with the configuration object <code
```yml
tests:
- text: helmet.frameguard() middleware should be mounted correctly
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.include(data.appStack, 'frameguard', 'helmet.frameguard() middleware is not mounted correctly'); }, xhr => { throw new Error(xhr.responseText); })
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.include(data.appStack, 'xFrameOptionsMiddleware', 'helmet.frameguard() middleware is not mounted correctly'); }, xhr => { throw new Error(xhr.responseText); })
- text: helmet.frameguard() 'action' should be set to 'DENY'
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.property(data.headers, 'x-frame-options'); assert.equal(data.headers['x-frame-options'], 'DENY');}, xhr => { throw new Error(xhr.responseText); })

View File

@ -23,7 +23,7 @@ Some web applications will serve untrusted HTML for download. Some versions of I
```yml
tests:
- text: helmet.ieNoOpen() middleware should be mounted correctly
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.include(data.appStack, 'ienoopen'); assert.equal(data.headers['x-download-options'], 'noopen'); }, xhr => { throw new Error(xhr.responseText); })
testString: getUserInput => $.get(getUserInput('url') + '/_api/app-info').then(data => { assert.include(data.appStack, 'xDownloadOptionsMiddleware'); assert.equal(data.headers['x-download-options'], 'noopen'); }, xhr => { throw new Error(xhr.responseText); })
```