Skip to content

Support for Chai .not #61

Description

@bergie

The chai .not expectation would be super useful, for example:

-
  name: 'listing hashes after removing'
  assertion: 'should not return the same hash'
  inputs:
    pinlist: true
  expect:
    out:
      not:
        contain: 'Qmctf39Vj8aLdg9icf2kvVcENyuNWBwy5TGWvHX9CZ6UkG'

Use case: the "listing hashes after removing" test in https://github.com/noflo/noflo-ipfs/blob/master/spec/Pin.yaml

Activity

  1. jonnor commented on Mar 2, 2016

    @jonnor
    Contributor

    I don't think we should attempt to chain / compose the expectations, that is kind-of a rabbithole. Very quickly one is inventing a whole programming language...

    So I think we should just havenotFoo operators, for every Foo that we think make sense. In the implementation we can programatically generate them, if it makes sense.

    Schema: https://github.com/flowbased/fbp-spec/blob/master/schemata/expectation.yaml
    Implementation: https://github.com/flowbased/fbp-spec/blob/master/src/expectation.coffee#L12

  2. jonnor commented on Mar 2, 2016

    @jonnor
    Contributor

    And then one should also add some testcases for the new operators in: https://github.com/flowbased/fbp-spec/blob/master/examples/predicates.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions