Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 21 07:15

    depfu[bot] on update

    (compare)

  • Aug 21 07:15

    gustavnikolaj on master

    Update eslint-config-standard t… (compare)

  • Aug 21 07:15
    gustavnikolaj closed #660
  • Aug 20 23:36
    depfu[bot] labeled #660
  • Aug 20 23:36
    depfu[bot] opened #660
  • Aug 20 23:25

    depfu[bot] on update

    Update eslint-config-standard t… (compare)

  • Aug 20 21:47
    papandreou commented #659
  • Aug 20 21:22
    papandreou synchronize #659
  • Aug 20 21:22

    papandreou on whenDecodedAsDiff

    Use _callInNestedContext when s… Dial back Expect bubble mode output and 2 more (compare)

  • Aug 20 08:34
    papandreou commented #659
  • Aug 20 08:22
    alexjeffburke commented #659
  • Aug 19 22:12
    papandreou commented #659
  • Aug 19 21:35
    papandreou commented #659
  • Aug 19 21:18
    papandreou synchronize #659
  • Aug 19 21:18

    papandreou on whenDecodedAsDiff

    Update documentation test (compare)

  • Aug 19 20:30
    papandreou assigned #659
  • Aug 19 20:30
    papandreou opened #659
  • Aug 19 20:30

    papandreou on whenDecodedAsDiff

    when decoded as: Fix missing di… (compare)

  • Aug 14 21:17
    depfu[bot] labeled #658
  • Aug 14 21:17
    depfu[bot] opened #658
Gustav Nikolaj
@gustavnikolaj
Thanks a lot :)
Andreas Lind
@papandreou
:tada:
Alex J Burke
@alexjeffburke
sounds like some fun stuff! Fwiw there is an implementation of taste but buffer so you can still return the bytes as part of the original stream within rightimage :)
Andreas Lind
@papandreou
@gustavnikolaj, you never said what you were doing with that crypto stuff?
Gustav Nikolaj
@gustavnikolaj
@papandreou Unfortunately not something I can reveal at this time :-)
Gert Sønderby
@gertsonderby
... Cryptic.
Gustav Nikolaj
@gustavnikolaj
@gertsonderby badumtish :laughing:
Gert Sønderby
@gertsonderby
I'll be here all week. Try the veal, and tip your waitress!
Gustav Nikolaj
@gustavnikolaj
Gert "The King of One-LinersWorders" Sønderby
Gert Sønderby
@gertsonderby
Request for advice: If I have a value that can, legally, be either a string or an object with a certain shape, what would be the best way to test that? Add a custom type for it, or some sort of switching in a custom assertion?
Or a third or fourth idea?
Andreas Lind
@papandreou
You have some tests that you want to pass regardless of which format a particular value has?
Sune Simonsen
@sunesimonsen
Depending on the use case there is expect.it(...).or(...)
Gustav Nikolaj
@gustavnikolaj
I popped a lot of stuff from my todo-stack and I finally got around to add a README to dislocator. It's only been two years since the last change in that repo... :watch: https://github.com/One-com/dislocator
Andreas Lind
@papandreou
Amazing! Those stacks can get very deep
Gustav Nikolaj
@gustavnikolaj
Yeah. We need a better system. ;-)
Andreas Lind
@papandreou
Gert Sønderby
@gertsonderby
Sorry for the delay, but yes. I have a case where a value can be a string label, or a react-intl message descriptor, in a library, and I'm adding a few assertions to test that the data fed in makes sense. I was not aware of expect.it().or(), but that fits my needs exactly. Thanks!
Andreas Lind
@papandreou
:tada:
Gert Sønderby
@gertsonderby
Standard operator precedence with .and()? As in expect.it('to be undefined').or('to have property', 'foo').and('to have property', 'bar')
The above would either expect it to have both properties foo and bar, or to be undefined.
Andreas Lind
@papandreou
Or groups have lower precedence
We hardcoded it like that because we figured it would be the most useful.
Gert Sønderby
@gertsonderby
Ah, so it's not commutative in the operator sense.
Andreas Lind
@papandreou
Nope
Gert Sønderby
@gertsonderby
So my example would pass if it had foo, but would never check for bar, and it = undefined would never pass.
Andreas Lind
@papandreou
If you have a failing test (or you get an expect.it inspected somehow), you'll also see the semantics reflected in how it is indented.
Gert Sønderby
@gertsonderby
I can see why it's not bragged about, this takes some wrapping to get my head around. :grinning:
Andreas Lind
@papandreou
;)
Your example would pass if the value is undefined, or if it's an object with both a foo and a bar property.
The or has the lowest precedence, so it's interpreted as (value === undefined || (value.foo && value.bar)), roughly speaking.
Gert Sønderby
@gertsonderby
Ah, so my assumption was correct...
I just found it in the documentation, and that actually makes it very clear.
Andreas Lind
@papandreou
Yeah, your original assumption was correct, but not your "So my example would pass if..." interpretation of what I wrote :)
Sorry for not helping :laughing:
Gert Sønderby
@gertsonderby
Right o.
Hey you helped plenty!
Andreas Lind
@papandreou
🤗
Alex J Burke
@alexjeffburke
hi folks - wanted to mention a little something. Just released a tool called httpgrok - it’s a little require hook (usable with -r options) that will output the http exchanges observed in the code it hooks on process.exit(). It leverages a lot of work we did on -mitm to split up the internals into classes that can be instantiated - in this case an HttpRecorder. It is early days but at the very least serves to prove we got the interfaces right :)
Sune Simonsen
@sunesimonsen
🔥
Alex J Burke
@alexjeffburke
Hey folks - opening this up to some discussion. @papandreou and I were discussing deno over the weekend and the result of that is a working port of Unexpected to deno. Very few changes were required as it turns out our browser build kept us rather honest - have opened a WIP PR with some more detail here: unexpectedjs/unexpected#657
Sune Simonsen
@sunesimonsen
Cool
Alex J Burke
@alexjeffburke
re the PR failing tests - seems that rollup has had a mishap we caught the middle of: rollup/rollup#3029
Alex J Burke
@alexjeffburke
deno update: the entire core test suite has been brought up: https://travis-ci.org/unexpectedjs/unexpected/jobs/569013826
Alex J Burke
@alexjeffburke
all - the feature/deno branch now passes tests on all existing platforms, so I'd like to start considering whether we could fold it in. Meanwhile, I've raised the question about what options we may have about avoiding checked in files with the deno registry: denoland/registry#145
Andreas Lind
@papandreou
:tada:
Alex J Burke
@alexjeffburke
Andreas Lind
@papandreou
:laughing:
Alex J Burke
@alexjeffburke
hey - have any of you folks heard about or hit this npm bug: https://github.com/eslint/eslint/pull/10022#issuecomment-369037304
Andreas Lind
@papandreou
I don’t think I’ve run into that particular one.