fix: add tests for header parser microservice project (#37187)
* fix: add tests for header parser microservice project * fix: make test more robust * fix: make text use 'should'pull/38030/head
parent
e65c47c6ba
commit
86127a24f7
|
@ -23,9 +23,13 @@ Start this project on Glitch using <a href='https://glitch.com/edit/#!/remix/clo
|
|||
|
||||
```yml
|
||||
tests:
|
||||
- text: 'I can get the IP address, language and operating system for my browser.'
|
||||
testString: ''
|
||||
|
||||
- text: 'Your IP address should be returned in the <code>ipaddress</code> key.'
|
||||
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/api/whoami'').then(data => assert(data.ipaddress && data.ipaddress.length > 0), xhr => { throw new Error(xhr.responseText)})'
|
||||
- text: 'Your preferred language should be returned in the <code>language</code> key.'
|
||||
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/api/whoami'').then(data => assert(data.language && data.language.length > 0), xhr => { throw new Error(xhr.responseText)})'
|
||||
- text: 'Your software should be returned in the <code>software</code> key.'
|
||||
testString: 'getUserInput => $.get(getUserInput(''url'') + ''/api/whoami'').then(data => assert(data.software && data.software.length > 0), xhr => { throw new Error(xhr.responseText)})'
|
||||
|
||||
```
|
||||
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue