hunk.code_window:           await Promise.all([p1, p2])
           },
         })
         await advanceUntilIdle()
         // Since we call `update` twice, frames are generated!
         expect(getFrames(ctrl)).toMatchSnapshot()
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:       await Promise.all([advanceUntilIdle(), promise])
         expect(ctrl.idle).toBeTruthy()
  
hunk.file_path: packages/core/src/Controller.test.ts
hunk.type: replace
file: import * as React from 'react';
  import { assert, test, _ } from 'spec.ts';
  import { animated, Spring } from '../..';
  import { AnimationResult, SpringValues, SpringUpdateFn } from 'core';
  
  const View = animated('div');
  
  test('basic usage', () => {
    <Spring
      from={{ opacity: 0 }}
      to={{ opacity: 1, color: 'blue' }}
      onRest={(result) => {
        assert(
          result,
          _ as Readonly<
            AnimationResult<{
              opacity: number;
              color: string;
            }>
          >
        );
      }}>
      {(values) => {
        assert(
          values,
          _ as SpringValues<{
            opacity: number;
            color: string;
          }>
        );
        return <View style={values} />;
      }}
    </Spring>;
  });
  
  test('with async function as "to" prop', () => {
    <Spring
      from={{ opacity: 0 }}
      to={async (next) => {
        assert(
          next,
          _ as SpringUpdateFn<{
            opacity: number;
          }>
        );
      }}>
      {(values) => {
        assert(
          values,
          _ as SpringValues<{
            opacity: number;
          }>
        );
        return <View style={values} />;
      }}
    </Spring>;
  });
  
  test('with array as "to" prop', () => {
    <Spring
      from={{ opacity: 0 }}
      to={[
        { opacity: 1 },
        {
          // Scripted animation inside an animation chain
          to: async (next) => {
            assert(
              next,
              _ as SpringUpdateFn<{
                opacity: number;
              }>
            );
          },
        },
      ]}>
      {(values) => {
        assert(
          values,
          _ as SpringValues<{
            opacity: number;
          }>
        );
        return <View style={values} />;
      }}
    </Spring>;
  });
  