noo

    0.0.1 • Public • Published

    API

    • Noo.createMock(): Mock
    • Noo.getChildReport(report, keys: string[]): Report;
    • Noo.getProp(mock, keys: string[]): any

    Example

    mock = Noo.createMock();
    mock.it.allows.eternal.property.access.and.callable().so.enjoy()
    mock(1)
    mock.it()
    mock.it.allows()
     
    console.log util.inspect mock.report()falsenull

    Dump

    { getCount: { it: 3 },
    setCount: {},
      setItems: {},
        applyCount: 1,
        applyArgumentsList: [ [ 1 ] ],
        properties:
        { it:
          { getCount: { allows: 2 },
          setCount: {},
            setItems: {},
              applyCount: 1,
              applyArgumentsList: [ [] ],
              properties:
              { allows:
                { getCount: { eternal: 1 },
                setCount: {},
                  setItems: {},
                    applyCount: 1,
                    applyArgumentsList: [ [] ],
                    properties:
                    { eternal:
                      { getCount: { property: 1 },
                      setCount: {},
                        setItems: {},
                          applyCount: 0,
                          applyArgumentsList: [],
                          properties:
                          { property:
                            { getCount: { access: 1 },
                            setCount: {},
                              setItems: {},
                                applyCount: 0,
                                applyArgumentsList: [],
                                properties:
                                { access:
                                  { getCount: { with: 1 },
                                  setCount: {},
                                    setItems: {},
                                      applyCount: 0,
                                      applyArgumentsList: [],
                                      properties:
                                      { with:
                                        { getCount: { callable: 1 },
                                        setCount: {},
                                          setItems: {},
                                            applyCount: 0,
                                            applyArgumentsList: [],
                                            properties:
                                            { callable:
                                              { getCount: {},
                                                setCount: {},
                                                  setItems: {},
                                                    applyCount: 1,
                                                    applyArgumentsList: [ [] ],
                                                    properties: {} } } } } } } } } } } } } } } }
    

    LICENSE

    MIT

    Keywords

    none

    Install

    npm i noo

    DownloadsWeekly Downloads

    0

    Version

    0.0.1

    License

    ISC

    Last publish

    Collaborators

    • mizchi