How to use inspect - 10 common examples

To help you get started, we’ve selected a few inspect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Andifeind / firescript / tests / unit / fs-nodes / restElement.spec.js View on Github external
it('returns a RestElement node', () => {
      const node = new RestElement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('RestElement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'RestElement',
        argument: {
          type: 'Identifier',
          name: 'args'
        }
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / debuggerStatement.spec.js View on Github external
it('returns a DebuggerStatement node', () => {
      const tokenStack = new TokenStack([
        { 'type': 'keyword', 'value': 'debugger' },
        { 'type': 'indention', 'value': 0 }
      ])

      const node = new DebuggerStatement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('DebuggerStatement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'DebuggerStatement'
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / super.spec.js View on Github external
it('returns a fs-node item', () => {
      const node = new Super(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('Super')
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / spreadElement.spec.js View on Github external
it('returns a SpreadElement node', () => {
      const node = new SpreadElement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('SpreadElement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'SpreadElement',
        argument: {
          type: 'Identifier',
          name: 'args'
        }
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / returnStatement.spec.js View on Github external
it('returns a fs-node item', () => {
      const node = new ReturnStatement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('ReturnStatement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'ReturnStatement',
        argument: {
          type: 'Identifier',
          name: 'banana'
        }
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / restElement.spec.js View on Github external
it('returns a RestElement node', () => {
      const node = new RestElement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('RestElement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'RestElement',
        argument: {
          type: 'Identifier',
          name: 'args'
        }
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / debuggerStatement.spec.js View on Github external
it('returns a DebuggerStatement node', () => {
      const tokenStack = new TokenStack([
        { 'type': 'keyword', 'value': 'debugger' },
        { 'type': 'indention', 'value': 0 }
      ])

      const node = new DebuggerStatement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('DebuggerStatement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'DebuggerStatement'
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / super.spec.js View on Github external
it('returns a fs-node item', () => {
      const node = new Super(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('Super')
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / spreadElement.spec.js View on Github external
it('returns a SpreadElement node', () => {
      const node = new SpreadElement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('SpreadElement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'SpreadElement',
        argument: {
          type: 'Identifier',
          name: 'args'
        }
      })
    })
  })
github Andifeind / firescript / tests / unit / fs-nodes / returnStatement.spec.js View on Github external
it('returns a fs-node item', () => {
      const node = new ReturnStatement(tokenStack)

      inspect(node).isObject()
      inspect(node.type).isEql('ReturnStatement')
      inspect(node.toJSON(ctx)).isEql({
        type: 'ReturnStatement',
        argument: {
          type: 'Identifier',
          name: 'banana'
        }
      })
    })
  })

inspect

Object method inspector

Unknown
Latest version published 14 years ago

Package Health Score

36 / 100
Full package analysis

Popular inspect functions