Skip to content

New assertion "assert.isXXX()", a syntax sugar of "assert.isInstanceOf()" #1

@piroor

Description

@piroor

Now, assert.isInstanceOf() requires two arguments (the expected type and the actual object), but other "isXXX" assertions (isString(), isArray(), etc.) requires only one argument, the actual value. It is annoying. We need "assert.isNSIFile()" (or "assert.is_nsIFile()") and other assertions like "isString()".

By "noSuchMethod()", we can generate such assertions automatically. "assert.isNSIFile()" should work as "assert.isInstanceOf(Ci.nsIFile, ...)".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions