How to use the term-img function in term-img

To help you get started, we’ve selected a few term-img examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github palmerhq / cypress-image-snapshot / src / reporter.js View on Github external
cache.forEach(({ diffRatio, diffPixelCount, diffOutputPath }) => {
        console.log(
          `\n  - ${diffOutputPath}\n    Screenshot was ${diffRatio *
            100}% different from saved snapshot with ${diffPixelCount} different pixels.\n`
        );
        termImage(diffOutputPath, { fallback });
      });
    }
github flood-io / element / packages / element / src / runtime / Browser.ts View on Github external
public async saveScreenshot(fn: (path: string) => Promise): Promise {
		const path = this.workRoot.join('screenshots', `${cuid()}.jpg`)
		debugScreenshot(`Saving screenshot to: ${path}`)

		if (await fn(path)) {
			this.screenshots.push(path)
			debugScreenshot(`Saved screenshot to: ${path}`)

			termImg(path, {
				width: '40%',
				fallback: () => {
					return `Screenshot path: ${path}`
				},
			})
		}
	}
}

term-img

Display images in iTerm

MIT
Latest version published 3 years ago

Package Health Score

56 / 100
Full package analysis

Popular term-img functions