-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Update test runner output with colors and diffs #2122
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
Conversation
| res->writeHeader(std::string_view("set-cookie", 10), std::string_view( | ||
| value.is8Bit() ? reinterpret_cast<const char*>(value.characters8()) : value.utf8().data(), value.length() | ||
| )); | ||
| res->writeHeader(std::string_view("set-cookie", 10), std::string_view(value.is8Bit() ? reinterpret_cast<const char*>(value.characters8()) : value.utf8().data(), value.length())); |
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.
you have clang-format right
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.
yup, these are formatting changes after merging main
|
|
||
| Vector<std::pair<String, JSValue>> ordered_properties; | ||
| for (auto property : properties) { | ||
| JSValue propertyValue = object->getDirect(vm, property); |
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.
is this correct? we don't want to call getters or prototype values? what happens if you pass it a Response subclass?
| }; | ||
|
|
||
| pub fn determineDiffMethod(this: JSValue, other: JSValue, global: *JSGlobalObject) DiffMethod { | ||
| if ((this.isString() and other.isString()) or (this.jsType() == .RegExpObject and other.jsType() == .RegExpObject) or (this.isBuffer(global) and other.isBuffer(global))) return .character; |
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.
we could still make jsType() == .RegExpObject a fn isRegExp(this: JSValue) bool
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.
👍
| var buf_writer = buffered_writer.writer(); | ||
| const Writer = @TypeOf(buf_writer); | ||
|
|
||
| JSC.ZigConsoleClient.format( |
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.
we probably should make the options to format a Struct because its getting a lot of fields
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.
👍
|
thank you @SuperAuguste for the diff library! |
Added diffz for character and line diffs. The function
diffLines()is the only change to the library.Object line diff

String character diff

Output changes for other matchers follow this format.


Before:
After: