-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add windows testing to CI by lifting OS into its own test matrix … #2081
Changes from all commits
0cdf620
fbb2d50
79ef637
811478a
dfa6e9c
0198099
6f3ca0a
a92d53b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,11 +113,11 @@ describe('WebClient', () => { | |
} catch (e) { | ||
// biome-ignore lint/suspicious/noExplicitAny: TODO: type this better, should be whatever error class web-api throws for timeouts | ||
const error = e as any; | ||
assert.isTrue((logger.warn as sinon.SinonStub).calledOnce, 'expected Logger to be called once'); | ||
assert.equal(error.code, ErrorCode.RequestError); | ||
assert.equal(error.original.config.timeout, timeoutOverride); | ||
assert.equal(error.original.isAxiosError, true); | ||
assert.instanceOf(error, Error); | ||
assert.isTrue((logger.warn as sinon.SinonStub).calledOnce, 'expected Logger to be called once'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved this assert down, as it flaked a few times on Windows in CI.. next time it does, I want to make sure these other assertions about the state of the error execute. |
||
} | ||
}); | ||
}); | ||
|
@@ -463,14 +463,13 @@ describe('WebClient', () => { | |
const scope = nock('https://slack.com', { | ||
reqheaders: { | ||
'User-Agent': (value) => { | ||
// User Agent value is different across platforms. | ||
// on mac this is: @slack:web-api/7.7.0 node/18.15.0 darwin/23.6.0 | ||
// on windows this is: @slack:web-api/7.7.0 cmd.exe /22.10.0 win32/10.0.20348 | ||
Comment on lines
+466
to
+468
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the detailed documentation. These kinda of notes help future maintainers a lot! |
||
const metadata = parseUserAgentIntoMetadata(value); | ||
// NOTE: this assert isn't that strong and doesn't say anything about the values. at this time, there | ||
// isn't a good way to test this without dupicating the logic of the code under test. | ||
assert.containsAllKeys(metadata, ['node', '@slack:web-api']); | ||
// NOTE: there's an assumption that if there's any keys besides these left at all, its the platform part | ||
metadata.node = undefined; | ||
metadata['@slack:client'] = undefined; | ||
assert.isNotEmpty(metadata); | ||
assert.containsAllKeys(metadata, ['@slack:web-api']); | ||
return true; | ||
}, | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason we don't run this test on Windows is that this code-under-test also doesn't run on Windows