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
Tom 2020-01-08 14:31:19 -06:00 committed by Randell Dawson
parent e65c47c6ba
commit 86127a24f7
1 changed files with 7 additions and 3 deletions

View File

@ -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>