
Front End Software Engineer @viewnext. Computer engineer @epcc_unex & Mobile Development Specialist @UPV.
- Tweets590
- Following371
- Followers206
- Likes958

ALT Una ilustración que indica cómo crear tests en Node 18 sin dependencias. Aparece el logo de Node JavaScript y al lado código, que es el siguiente: import test from 'node:test' import { strict as assert } from 'node:assert' const subtract = (a, b) => a - b test('subtract', (t) => { t.test('subtracts two numbers', () => { // 1 menos 2 es -1 assert.equal(subtract(1, 2), -1) }) t.test('subtracts two numbers', () => { // 2 menos 1 es 1 assert.equal(subtract(2, 1), 1) }) })

ALT A website usually uses external resources like images, CSS, and JavaScript. Those files need to be loaded from network or cache. The main thread could request them one by one as they find them while parsing to build a DOM, but in order to speed up, "preload scanner" is run concurrently. If there are things like <img> or <link> in the HTML document, preload scanner peeks at tokens generated by HTML parser and sends requests to the network thread in the browser process.

ALT Our work has been focused on foundational optimizations for resources like images, JS, CSS, fonts. We've shipped a number of optimizations to improve the defaults of multiple frameworks, including: An Image component in Next.js that encapsulates best practices for image loading, followed by a collaboration with Nuxt on the same. Use of this component has resulted in significant improvements to paint times and layout shift (example: 57% reduction in Largest Contentful Paint and 100% reduction in Cumulative Layout Shift on nextjs.org/give). Automated inlining of CSS for Web Font declarations at build time. This feature has landed in Angular (Google Fonts) and Next.js (Google Fonts & Adobe Fonts) resulting in notable improvements to Largest Contentful Paint and First Contentful Paint (example). Inlining critical CSS using Critters in both Angular and Next.js to reduce paint times. Resulted in a 20-30 point improvement in Lighthouse performance scores in a typical, large-scale Angular app




![Código de JavaScript: const heroes = [ { name: "Thor", team: "avenger", power: 50 }, { name: "Batman", team: "justice", power: 10 }, { name: "IronMan", team: "avenger", power: 25 }, { name: "SuperMan", team: "justice", power: 99 }, ]](https://pbs.twimg.com/media/F5_jvUhbIAAKJ5F.jpg?name=small&format=webp)






















