How to use cucumber-query - 4 common examples

To help you get started, we’ve selected a few cucumber-query 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 cucumber / cucumber / html-formatter / javascript / src / main.tsx View on Github external
declare global {
  interface Window {
    CUCUMBER_MESSAGES: any[]
  }
}

const envelopes = window.CUCUMBER_MESSAGES.map((message: any) =>
  messages.Envelope.fromObject(message)
)

const gherkinDocuments = envelopes
  .filter(e => e.gherkinDocument)
  .map(e => e.gherkinDocument)
const cucumberQuery = envelopes.reduce(
  (q, e) => q.update(e),
  new CucumberQuery()
)

const app = (
  
)

ReactDOM.render(app, document.getElementById('content'))
github cucumber / cucumber / html-formatter / javascript / src / cli-main.tsx View on Github external
readFile(__dirname + '/../main.js', (err: Error, js: Buffer) => {
      if (err) {
        return callback(err)
      }

      const gherkinDocuments = this.envelopes
        .filter(e => e.gherkinDocument)
        .map(e => e.gherkinDocument)
      const cucumberQuery = this.envelopes.reduce(
        (q, e) => q.update(e),
        new CucumberQuery()
      )

      this.push(`

  
    <title>Cucumber</title>
    
  
  
    <div id="content">
`)
      this.push(
        renderToString(
          </div>
github cucumber / cucumber / cucumber-react / javascript / stories / index.stories.tsx View on Github external
.add('Document list', () =&gt; {
    const gherkinDocuments = envelopes.filter(e =&gt; e.gherkinDocument).map(e =&gt; e.gherkinDocument)
    const gherkinQuery = new GherkinQuery()
    const cucumberQuery = new CucumberQuery(gherkinQuery)
    for (const envelope of envelopes) {
      gherkinQuery.update(envelope)
      cucumberQuery.update(envelope)
    }
    return 
  })
  .add('Steps', () =&gt; {
github cucumber / cucumber / cucumber-react / javascript / src / CucumberQueryContext.ts View on Github external
import React from 'react'
import CucumberQuery from 'cucumber-query'
import { GherkinQuery } from 'gherkin'

export default React.createContext(new CucumberQuery(new GherkinQuery()))

cucumber-query

Cucumber Query - query messages

MIT
Latest version published 5 years ago

Package Health Score

56 / 100
Full package analysis

Popular cucumber-query functions