How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • await render(AppComponent, {detectChanges: false})
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {
      imports: [AppModule], // a module that includes AppComponent
      excludeComponentDeclaration: true,
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {
      providers: [
        CustomersService,
        {
          provide: MAX_CUSTOMERS_TOKEN,
          useValue: 10,
        },
      ],
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {
      declarations: [ChildComponent],
      routes: [
        {
          path: '',
          children: [
            {
              path: 'child/:id',
              component: ChildComponent,
            },
          ],
        },
      ],
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • await render(AppComponent, {
      imports: [AppSharedModule, MaterialModule],
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token builtin">any</span></code></pre>
    Docs
    0
  • import { enableProdMode } from '@angular/core';
    import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
    
    import { AppModule } from './app/app.module';
    import { environment } from './environments/environment';
    
    if (environment.production) {
      enableProdMode();
    }
    
    platformBrowserDynamic().bootstrapModule(AppModule);
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>alias<span class="token punctuation">)</span> <span class="token keyword">function</span> <span class="token function">enableProdMode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token keyword">void</span> <span class="token keyword">import</span> enableProdMode</code><div class="typing-tooltip-markup">Disable Angular's development mode, which turns off assertions and other checks within the framework. One important assertion this disables verifies that a change detection pass does not result in additional changes to any bindings (also known as unidirectional data flow).<br><br><em>@publicApi</em></div></pre>
    Docs
    0
  • const {debug} = await render(AppComponent)
    
    debug()
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">const</span> debug<span class="token operator">:</span> <span class="token builtin">any</span></code></pre>
    Docs
    0
  • import {configure, screen} from '@testing-library/testcafe'
    
    fixture`configure`.clientScripts(
      configure({testIdAttribute: 'data-automation-id'}),
    ).page`http://localhost:13370`
    
    test('supports alternative testIdAttribute', async t => {
      await t.click(screen.getByTestId('image-with-random-alt-tag'))
    })
    
    test('still works after browser page load and reload', async t => {
      await t.click(screen.getByText('Go to Page 2'))
    
      await t.eval(() => location.reload(true))
    
      await t
        .click(screen.getByTestId('page2-thing'))
        .expect(screen.getByText('second page').exists)
        .ok()
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>alias<span class="token punctuation">)</span> <span class="token keyword">function</span> <span class="token function">configure</span><span class="token punctuation">(</span><span class="token parameter">options<span class="token operator">:</span> Partial<span class="token operator">&lt;</span>Options<span class="token operator">></span></span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token punctuation">{</span> content<span class="token operator">:</span> <span class="token builtin">string</span><span class="token punctuation">;</span> <span class="token punctuation">}</span> <span class="token keyword">import</span> configure</code></pre>
    Docs
    0
  • import {within, screen} from '@testing-library/testcafe'
    
    fixture`within`.page`http://localhost:13370`
    
    test('works with getBy* selectors', async t => {
      await t
        .expect(
          within(screen.getByTestId('nested')).getByText('Button Text').exists,
        )
        .ok()
    })
    
    test('works with CSS selector strings', async t => {
      const {getByText} = await within('#nested')
      await t.click(getByText('Button Text')).ok()
    })
    
    test('works on any testcafe selector', async t => {
      const nested = Selector('#nested')
    
      await t.expect(within(nested).getByText('Button Text').exists).ok()
    })
    
    test('works with results from "byAll" query with index - regex', async t => {
      const nestedDivs = screen.getAllByTestId(/nested/)
      await t.expect(nestedDivs.count).eql(2)
    
      await t
        .expect(within(nestedDivs.nth(0)).getByText('Button Text').exists)
        .ok()
        .expect(
          within(nestedDivs.nth(1)).getByText('text only in 2nd nested').exists,
        )
        .ok()
    })
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token punctuation">(</span>alias<span class="token punctuation">)</span> <span class="token keyword">function</span> <span class="token function">within</span><span class="token punctuation">(</span><span class="token parameter">selector<span class="token operator">:</span> SelectorArg</span><span class="token punctuation">)</span><span class="token operator">:</span> WithinSelectors <span class="token keyword">import</span> within</code></pre>
    Docs
    0
  • const {rerender} = await render(Counter, {componentProperties: {count: 4}})
    
    expect(screen.getByTestId('count-value').textContent).toBe('4')
    
    rerender({count: 7})
    
    expect(screen.getByTestId('count-value').textContent).toBe('7')
    <pre class="typing-tooltip"><code data-language="javascript" class="language-javascript"><span class="token keyword">const</span> rerender<span class="token operator">:</span> <span class="token builtin">any</span></code></pre>
    Docs
    0
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples