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'
This commit is contained in:
Tom
2020-01-08 14:31:19 -06:00
committed by Randell Dawson
parent e65c47c6ba
commit 86127a24f7

View File

@ -23,8 +23,12 @@ Start this project on Glitch using <a href='https://glitch.com/edit/#!/remix/clo
```yml ```yml
tests: tests:
- text: 'I can get the IP address, language and operating system for my browser.' - text: 'Your IP address should be returned in the <code>ipaddress</code> key.'
testString: '' 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)})'
``` ```