version: 2 # CircleCI version 2

jobs:
  build:
    working_directory: ~/transcriptase
    # The primary container is an instance of the first list image listed. Your build commands run in this container.
    docker:
      - image: circleci/node:8.1.0
    steps:
      - checkout
test:
  docker:
    - image: circleci/node:8.1.0
  environment:
    - PATH: ${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin
  steps:
    - checkout
    - run: npm install -g npm@latest
    - run: npm install -g yarn@latest
    - run:
        name: test
        command: yarn test
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build

version: 2 # CircleCI version 2

jobs:
  build:
    working_directory: ~/transcriptase
    # The primary container is an instance of the first list image listed. Your build commands run in this container.
    docker:
      - image: circleci/node:8.1.0
    steps:
      - checkout
  test:
    docker:
      - image: circleci/node:8.1.0
    environment:
      - PATH: ${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin
    steps:
      - checkout
      - run: npm install -g npm@latest
      - run: npm install -g yarn@latest
      - run:
          name: test
          command: yarn test
workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build

Make `test` a key under `jobs`
Make `test` a key under `jobs`
