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

  • import {Component, NgModule} from '@angular/core'
    import {render, screen} from '@testing-library/angular'
    import {ngMocks} from 'ng-mocks'
      selector: 'app-parent-component',
      template: '<app-child-component></app-child-component>',
    class ParentComponent {}
      selector: 'app-child-component',
      template: '<p>Child component</p>',
    class ChildComponent {}
      declarations: [ParentComponent, ChildComponent],
    export class AppModule {}
    describe('ParentComponent', () => {
      it('should not render ChildComponent when shallow rendering', async () => {
        const dependencies = ngMocks.guts(null, AppModule, ParentComponent)
        await render(ParentComponent, dependencies)
        expect(screen.queryByText('Child component')).toBeNull()
  • let animations = document.querySelector(".animate").getAnimations();
  • let animations = document.querySelector(".animate").getAnimations();
      title: 'Custom animation with Animate.css',
      showClass: {
        popup: 'animate__animated animate__fadeInDown'
      hideClass: {
        popup: 'animate__animated animate__fadeOutUp'
  • // The cake has its own animation:
    var nommingCake = document.getElementById('eat-me_sprite').animate(
      { transform: 'translateY(0)' },
      { transform: 'translateY(-80%)' }
    ], {
      fill: 'forwards',
      easing: 'steps(4, end)',
      duration: aliceChange.effect.timing.duration / 2
    // Pause the cake's animation so it doesn't play immediately.
    // This function will play when ever a user clicks or taps
    var growAlice = function() {
      // Play Alice's animation.;
      // Play the cake's animation.;
    // When a user holds their mouse down or taps, call growAlice to make all the animations play.
    cake.addEventListener("mousedown", growAlice, false);
    cake.addEventListener("touchstart", growAlice, false);
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples