This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
We need some tests to ensure that the parseMessage function is working as we expect.
I have added a test using a 'theory' concept in order to allow us to do multiple parameterized tests against the parseMessage function without having to add a new test for each 'theory' we want to examine.
I have added 9 theories to the test which hopefully handles the majority of the options end-users might try while using our extension.
Added Files
twitchLanguageServer.test.ts Used for all our tests against the Twitch language server.
Changed Files
constants.ts Included additional constants to use within our project.
extension.ts Cleaned up some of the code to use the constants instead of hard coded strings.
extension.test.ts Cleaned up some of the code to use the constants instead of hard coded strings.
twitchChatClient.ts Cleaned up some of the code to use the constants instead of hard coded strings.
twitchLanguageServer.ts Cleaned up some of the code to use the constants instead of hard coded strings. Exported the parseMessage function in order to make it available to our tests and also changed the function to return the results so our tests can compare against it.
Purpose
We need some tests to ensure that the
parseMessage
function is working as we expect.I have added a test using a 'theory' concept in order to allow us to do multiple parameterized tests against the
parseMessage
function without having to add a new test for each 'theory' we want to examine.I have added 9 theories to the test which hopefully handles the majority of the options end-users might try while using our extension.
Added Files
twitchLanguageServer.test.ts
Used for all our tests against the Twitch language server.Changed Files
constants.ts
Included additional constants to use within our project.extension.ts
Cleaned up some of the code to use the constants instead of hard coded strings.extension.test.ts
Cleaned up some of the code to use the constants instead of hard coded strings.twitchChatClient.ts
Cleaned up some of the code to use the constants instead of hard coded strings.twitchLanguageServer.ts
Cleaned up some of the code to use the constants instead of hard coded strings. Exported theparseMessage
function in order to make it available to our tests and also changed the function to return the results so our tests can compare against it.