salesforce / lwc-test

LWC plugins and utilities for testing
MIT License
44 stars 30 forks source link

`console.warn` for compiler warnings in Jest #295

Open nolanlawson opened 2 weeks ago

nolanlawson commented 2 weeks ago

Right now compiler warnings are ignored in Jest tests:

https://github.com/salesforce/lwc-test/blob/2a880cf145bc5baaf4a8b5b0255097cd6526a846/packages/%40lwc/jest-transformer/src/index.js#L100

We should probably console.warn these so that they don't get lost.

Example of a compiler warning:

<template>
  <slot></slot>
  <slot></slot> <!-- causes "duplicate slot" warning -->
</template>
nolanlawson commented 1 week ago

W-16647806