fix(client): update middleware names of helmet.js tests
This commit is contained in:
@ -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); })
|
||||
|
||||
```
|
||||
|
||||
|
@ -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); })
|
||||
|
||||
|
@ -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); })
|
||||
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user