This repository was archived by the owner on Feb 1, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 55 ],
66 "rules": {
77 "unicorn/no-abusive-eslint-disable": 1,
8- "unicorn/prefer-node-protocol":0,
8+ "unicorn/prefer-node-protocol": 0,
99 "unicorn/import-style": 1,
1010 "unicorn/no-array-reduce": 1
1111 }
Original file line number Diff line number Diff line change 11import ux from '../src'
22
33import { expect , fancy } from './fancy'
4+ // eslint-disable-next-line unicorn/prefer-module
5+ const hyperlinker = require ( 'hyperlinker' )
46
5- process . env . FORCE_HYPERLINK = '1'
6-
7- describe . skip ( 'prompt' , ( ) => {
7+ describe ( 'url' , ( ) => {
88 fancy
9+ . env ( { FORCE_HYPERLINK : '1' } , { clear : true } )
910 . stdout ( )
1011 . do ( ( ) => ux . url ( 'sometext' , 'https://google.com' ) )
1112 . it ( 'renders hyperlink' , async ( { stdout} ) => {
12- expect ( stdout ) . to . equal ( 'ttps://google.com\u0007sometext\n' )
13+ expect ( stdout ) . to . equal ( 'sometext\n' )
14+ } )
15+ } )
16+
17+ describe ( 'hyperlinker' , ( ) => {
18+ fancy
19+ . it ( 'renders hyperlink' , async ( ) => {
20+ const link = hyperlinker ( 'sometext' , 'https://google.com' , { } )
21+ // eslint-disable-next-line unicorn/escape-case
22+ const expected = '\u001b]8;;https://google.com\u0007sometext\u001b]8;;\u0007'
23+ expect ( link ) . to . equal ( expected )
1324 } )
1425} )
You can’t perform that action at this time.
0 commit comments