11cb0ef41Sopenharmony_ci// Flags: --expose-internals 21cb0ef41Sopenharmony_ci'use strict'; 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_cirequire('../common'); 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciconst { URL, parse } = require('url'); 71cb0ef41Sopenharmony_ciconst assert = require('assert'); 81cb0ef41Sopenharmony_ciconst { isURL } = require('internal/url'); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ciassert.strictEqual(isURL(new URL('https://www.nodejs.org')), true); 111cb0ef41Sopenharmony_ciassert.strictEqual(isURL(parse('https://www.nodejs.org')), false); 121cb0ef41Sopenharmony_ciassert.strictEqual(isURL({ 131cb0ef41Sopenharmony_ci href: 'https://www.nodejs.org', 141cb0ef41Sopenharmony_ci protocol: 'https:', 151cb0ef41Sopenharmony_ci path: '/', 161cb0ef41Sopenharmony_ci}), false); 17