function assertPresence(code, codeFragments) {
  for (const codeFragment of codeFragments) {
    if (!code.includes(codeFragment)) {
      throw new Error(`did not find expected code fragment: ${codeFragment}`);
    }
  }
}
@param {string} code
@param {string[]} codeFragments