11cb0ef41Sopenharmony_ciexport async function load(url, context, next) {
21cb0ef41Sopenharmony_ci  // This check is needed to make sure that we don't prevent the
31cb0ef41Sopenharmony_ci  // resolution from follow-up loaders. It wouldn't be a problem
41cb0ef41Sopenharmony_ci  // in real life because loaders aren't supposed to break the
51cb0ef41Sopenharmony_ci  // resolution, but the ones used in our tests do, for convenience.
61cb0ef41Sopenharmony_ci  if (url === 'node:fs' || url.includes('loader')) {
71cb0ef41Sopenharmony_ci    return next(url);
81cb0ef41Sopenharmony_ci  }
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci  const val = url.includes('42')
111cb0ef41Sopenharmony_ci    ? '42'
121cb0ef41Sopenharmony_ci    : '"foo"';
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci  return {
151cb0ef41Sopenharmony_ci    format: 'module',
161cb0ef41Sopenharmony_ci    shortCircuit: true,
171cb0ef41Sopenharmony_ci    source: `export default ${val}`,
181cb0ef41Sopenharmony_ci  };
191cb0ef41Sopenharmony_ci}
20