Best JavaScript code snippet using wpt
identifier_utils_test.py
Source:identifier_utils_test.py
1# coding: utf-82#3# Copyright (C) 2013-2018 ycmd contributors4#5# This file is part of ycmd.6#7# ycmd is free software: you can redistribute it and/or modify8# it under the terms of the GNU General Public License as published by9# the Free Software Foundation, either version 3 of the License, or10# (at your option) any later version.11#12# ycmd is distributed in the hope that it will be useful,13# but WITHOUT ANY WARRANTY; without even the implied warranty of14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15# GNU General Public License for more details.16#17# You should have received a copy of the GNU General Public License18# along with ycmd. If not, see <http://www.gnu.org/licenses/>.19from __future__ import unicode_literals20from __future__ import print_function21from __future__ import division22from __future__ import absolute_import23# Not installing aliases from python-future; it's unreliable and slow.24from builtins import * # noqa25from nose.tools import eq_, ok_26from ycmd import identifier_utils as iu27from hamcrest import assert_that, has_item28def RemoveIdentifierFreeText_CppComments_test():29 eq_( "foo \nbar \nqux",30 iu.RemoveIdentifierFreeText( "foo \nbar //foo \nqux" ) )31def RemoveIdentifierFreeText_PythonComments_test():32 eq_( "foo \nbar \nqux",33 iu.RemoveIdentifierFreeText( "foo \nbar #foo \nqux" ) )34def RemoveIdentifierFreeText_CstyleComments_test():35 eq_( "\n bar",36 iu.RemoveIdentifierFreeText( "/* foo\n */ bar" ) )37 eq_( "foo \nbar \nqux",38 iu.RemoveIdentifierFreeText( "foo \nbar /* foo */\nqux" ) )39 eq_( "foo \nbar \n\nqux",40 iu.RemoveIdentifierFreeText( "foo \nbar /* foo \n foo2 */\nqux" ) )41def RemoveIdentifierFreeText_SimpleSingleQuoteString_test():42 eq_( "foo \nbar \nqux",43 iu.RemoveIdentifierFreeText( "foo \nbar 'foo'\nqux" ) )44def RemoveIdentifierFreeText_SimpleDoubleQuoteString_test():45 eq_( "foo \nbar \nqux",46 iu.RemoveIdentifierFreeText( 'foo \nbar "foo"\nqux' ) )47def RemoveIdentifierFreeText_EscapedQuotes_test():48 eq_( "foo \nbar \nqux",49 iu.RemoveIdentifierFreeText( "foo \nbar 'fo\\'oz\\nfoo'\nqux" ) )50 eq_( "foo \nbar \nqux",51 iu.RemoveIdentifierFreeText( 'foo \nbar "fo\\"oz\\nfoo"\nqux' ) )52def RemoveIdentifierFreeText_SlashesInStrings_test():53 eq_( "foo \nbar baz\nqux ",54 iu.RemoveIdentifierFreeText( 'foo \nbar "fo\\\\"baz\nqux "qwe"' ) )55 eq_( "foo \nbar \nqux ",56 iu.RemoveIdentifierFreeText( "foo '\\\\'\nbar '\\\\'\nqux '\\\\'" ) )57def RemoveIdentifierFreeText_EscapedQuotesStartStrings_test():58 eq_( "\\\"foo\\\" zoo",59 iu.RemoveIdentifierFreeText( "\\\"foo\\\"'\"''bar' zoo'test'" ) )60 eq_( "\\'foo\\' zoo",61 iu.RemoveIdentifierFreeText( "\\'foo\\'\"'\"\"bar\" zoo\"test\"" ) )62def RemoveIdentifierFreeText_NoMultilineString_test():63 eq_( "'\nlet x = \nlet y = ",64 iu.RemoveIdentifierFreeText( "'\nlet x = 'foo'\nlet y = 'bar'" ) )65 eq_( "\"\nlet x = \nlet y = ",66 iu.RemoveIdentifierFreeText( "\"\nlet x = \"foo\"\nlet y = \"bar\"" ) )67def RemoveIdentifierFreeText_PythonMultilineString_test():68 eq_( "\n\n\nzoo",69 iu.RemoveIdentifierFreeText( "\"\"\"\nfoobar\n\"\"\"\nzoo" ) )70 eq_( "\n\n\nzoo",71 iu.RemoveIdentifierFreeText( "'''\nfoobar\n'''\nzoo" ) )72def RemoveIdentifierFreeText_GoBackQuoteString_test():73 eq_( "foo \nbar `foo`\nqux",74 iu.RemoveIdentifierFreeText( "foo \nbar `foo`\nqux" ) )75 eq_( "foo \nbar \nqux",76 iu.RemoveIdentifierFreeText( "foo \nbar `foo`\nqux", filetype = 'go' ) )77def ExtractIdentifiersFromText_test():78 eq_( [ "foo", "_bar", "BazGoo", "FOO", "_", "x", "one", "two", "moo", "qqq" ],79 iu.ExtractIdentifiersFromText(80 "foo $_bar \n&BazGoo\n FOO= !!! '-' - _ (x) one-two !moo [qqq]" ) )81def ExtractIdentifiersFromText_Css_test():82 eq_( [ "foo", "-zoo", "font-size", "px", "a99" ],83 iu.ExtractIdentifiersFromText(84 "foo -zoo {font-size: 12px;} a99", "css" ) )85def ExtractIdentifiersFromText_Html_test():86 eq_( [ "foo", "goo-foo", "zoo", "bar", "aa", "z", "b@g", "fo", "ba" ],87 iu.ExtractIdentifiersFromText(88 '<foo> <goo-foo zoo=bar aa="" z=\'\'/> b@g fo.ba', "html" ) )89def ExtractIdentifiersFromText_Html_TemplateChars_test():90 assert_that( iu.ExtractIdentifiersFromText( '<foo>{{goo}}</foo>', 'html' ),91 has_item( 'goo' ) )92def ExtractIdentifiersFromText_JavaScript_test():93 eq_( [ "var", "foo", "require", "bar" ],94 iu.ExtractIdentifiersFromText( "var foo = require('bar');",95 'javascript' ) )96def IsIdentifier_Default_test():97 ok_( iu.IsIdentifier( 'foo' ) )98 ok_( iu.IsIdentifier( 'foo129' ) )99 ok_( iu.IsIdentifier( 'f12' ) )100 ok_( iu.IsIdentifier( 'f12' ) )101 ok_( iu.IsIdentifier( '_foo' ) )102 ok_( iu.IsIdentifier( '_foo129' ) )103 ok_( iu.IsIdentifier( '_f12' ) )104 ok_( iu.IsIdentifier( '_f12' ) )105 ok_( iu.IsIdentifier( 'uniçode' ) )106 ok_( iu.IsIdentifier( 'uç' ) )107 ok_( iu.IsIdentifier( 'ç' ) )108 ok_( iu.IsIdentifier( 'çode' ) )109 ok_( not iu.IsIdentifier( '1foo129' ) )110 ok_( not iu.IsIdentifier( '-foo' ) )111 ok_( not iu.IsIdentifier( 'foo-' ) )112 ok_( not iu.IsIdentifier( 'font-face' ) )113 ok_( not iu.IsIdentifier( None ) )114 ok_( not iu.IsIdentifier( '' ) )115def IsIdentifier_JavaScript_test():116 ok_( iu.IsIdentifier( '_føo1', 'javascript' ) )117 ok_( iu.IsIdentifier( 'fø_o1', 'javascript' ) )118 ok_( iu.IsIdentifier( '$føo1', 'javascript' ) )119 ok_( iu.IsIdentifier( 'fø$o1', 'javascript' ) )120 ok_( not iu.IsIdentifier( '1føo', 'javascript' ) )121def IsIdentifier_TypeScript_test():122 ok_( iu.IsIdentifier( '_føo1', 'typescript' ) )123 ok_( iu.IsIdentifier( 'fø_o1', 'typescript' ) )124 ok_( iu.IsIdentifier( '$føo1', 'typescript' ) )125 ok_( iu.IsIdentifier( 'fø$o1', 'typescript' ) )126 ok_( not iu.IsIdentifier( '1føo', 'typescript' ) )127def IsIdentifier_Css_test():128 ok_( iu.IsIdentifier( 'foo' , 'css' ) )129 ok_( iu.IsIdentifier( 'a' , 'css' ) )130 ok_( iu.IsIdentifier( 'a1' , 'css' ) )131 ok_( iu.IsIdentifier( 'a-' , 'css' ) )132 ok_( iu.IsIdentifier( 'a-b' , 'css' ) )133 ok_( iu.IsIdentifier( '_b' , 'css' ) )134 ok_( iu.IsIdentifier( '-ms-foo' , 'css' ) )135 ok_( iu.IsIdentifier( '-_o' , 'css' ) )136 ok_( iu.IsIdentifier( 'font-face', 'css' ) )137 ok_( iu.IsIdentifier( 'αβγ' , 'css' ) )138 ok_( not iu.IsIdentifier( '-3b', 'css' ) )139 ok_( not iu.IsIdentifier( '-3' , 'css' ) )140 ok_( not iu.IsIdentifier( '--' , 'css' ) )141 ok_( not iu.IsIdentifier( '3' , 'css' ) )142 ok_( not iu.IsIdentifier( '' , 'css' ) )143 ok_( not iu.IsIdentifier( 'â¬' , 'css' ) )144def IsIdentifier_R_test():145 ok_( iu.IsIdentifier( 'a' , 'r' ) )146 ok_( iu.IsIdentifier( 'a.b' , 'r' ) )147 ok_( iu.IsIdentifier( 'a.b.c', 'r' ) )148 ok_( iu.IsIdentifier( 'a_b' , 'r' ) )149 ok_( iu.IsIdentifier( 'a1' , 'r' ) )150 ok_( iu.IsIdentifier( 'a_1' , 'r' ) )151 ok_( iu.IsIdentifier( '.a' , 'r' ) )152 ok_( iu.IsIdentifier( '.a_b' , 'r' ) )153 ok_( iu.IsIdentifier( '.a1' , 'r' ) )154 ok_( iu.IsIdentifier( '...' , 'r' ) )155 ok_( iu.IsIdentifier( '..1' , 'r' ) )156 ok_( not iu.IsIdentifier( '.1a', 'r' ) )157 ok_( not iu.IsIdentifier( '.1' , 'r' ) )158 ok_( not iu.IsIdentifier( '1a' , 'r' ) )159 ok_( not iu.IsIdentifier( '123', 'r' ) )160 ok_( not iu.IsIdentifier( '_1a', 'r' ) )161 ok_( not iu.IsIdentifier( '_a' , 'r' ) )162 ok_( not iu.IsIdentifier( '' , 'r' ) )163def IsIdentifier_Clojure_test():164 ok_( iu.IsIdentifier( 'foo' , 'clojure' ) )165 ok_( iu.IsIdentifier( 'f9' , 'clojure' ) )166 ok_( iu.IsIdentifier( 'a.b.c', 'clojure' ) )167 ok_( iu.IsIdentifier( 'a.c' , 'clojure' ) )168 ok_( iu.IsIdentifier( 'a/c' , 'clojure' ) )169 ok_( iu.IsIdentifier( '*' , 'clojure' ) )170 ok_( iu.IsIdentifier( 'a*b' , 'clojure' ) )171 ok_( iu.IsIdentifier( '?' , 'clojure' ) )172 ok_( iu.IsIdentifier( 'a?b' , 'clojure' ) )173 ok_( iu.IsIdentifier( ':' , 'clojure' ) )174 ok_( iu.IsIdentifier( 'a:b' , 'clojure' ) )175 ok_( iu.IsIdentifier( '+' , 'clojure' ) )176 ok_( iu.IsIdentifier( 'a+b' , 'clojure' ) )177 ok_( iu.IsIdentifier( '-' , 'clojure' ) )178 ok_( iu.IsIdentifier( 'a-b' , 'clojure' ) )179 ok_( iu.IsIdentifier( '!' , 'clojure' ) )180 ok_( iu.IsIdentifier( 'a!b' , 'clojure' ) )181 ok_( not iu.IsIdentifier( '9f' , 'clojure' ) )182 ok_( not iu.IsIdentifier( '9' , 'clojure' ) )183 ok_( not iu.IsIdentifier( 'a/b/c', 'clojure' ) )184 ok_( not iu.IsIdentifier( '(a)' , 'clojure' ) )185 ok_( not iu.IsIdentifier( '' , 'clojure' ) )186def IsIdentifier_Elisp_test():187 # elisp is using the clojure regexes, so we're testing this more lightly188 ok_( iu.IsIdentifier( 'foo' , 'elisp' ) )189 ok_( iu.IsIdentifier( 'f9' , 'elisp' ) )190 ok_( iu.IsIdentifier( 'a.b.c', 'elisp' ) )191 ok_( iu.IsIdentifier( 'a/c' , 'elisp' ) )192 ok_( not iu.IsIdentifier( '9f' , 'elisp' ) )193 ok_( not iu.IsIdentifier( '9' , 'elisp' ) )194 ok_( not iu.IsIdentifier( 'a/b/c', 'elisp' ) )195 ok_( not iu.IsIdentifier( '(a)' , 'elisp' ) )196 ok_( not iu.IsIdentifier( '' , 'elisp' ) )197def IsIdentifier_Haskell_test():198 ok_( iu.IsIdentifier( 'foo' , 'haskell' ) )199 ok_( iu.IsIdentifier( "foo'", 'haskell' ) )200 ok_( iu.IsIdentifier( "x'" , 'haskell' ) )201 ok_( iu.IsIdentifier( "_x'" , 'haskell' ) )202 ok_( iu.IsIdentifier( "_x" , 'haskell' ) )203 ok_( iu.IsIdentifier( "x9" , 'haskell' ) )204 ok_( not iu.IsIdentifier( "'x", 'haskell' ) )205 ok_( not iu.IsIdentifier( "9x", 'haskell' ) )206 ok_( not iu.IsIdentifier( "9" , 'haskell' ) )207 ok_( not iu.IsIdentifier( '' , 'haskell' ) )208def IsIdentifier_Tex_test():209 ok_( iu.IsIdentifier( 'foo' , 'tex' ) )210 ok_( iu.IsIdentifier( 'fig:foo' , 'tex' ) )211 ok_( iu.IsIdentifier( 'fig:foo-bar', 'tex' ) )212 ok_( iu.IsIdentifier( 'sec:summary', 'tex' ) )213 ok_( iu.IsIdentifier( 'eq:bar_foo' , 'tex' ) )214 ok_( iu.IsIdentifier( 'fÅo' , 'tex' ) )215 ok_( iu.IsIdentifier( 'some8' , 'tex' ) )216 ok_( not iu.IsIdentifier( '\\section', 'tex' ) )217 ok_( not iu.IsIdentifier( 'foo:' , 'tex' ) )218 ok_( not iu.IsIdentifier( '-bar' , 'tex' ) )219 ok_( not iu.IsIdentifier( '' , 'tex' ) )220def IsIdentifier_Perl6_test():221 ok_( iu.IsIdentifier( 'foo' , 'perl6' ) )222 ok_( iu.IsIdentifier( "f-o" , 'perl6' ) )223 ok_( iu.IsIdentifier( "x'y" , 'perl6' ) )224 ok_( iu.IsIdentifier( "_x-y" , 'perl6' ) )225 ok_( iu.IsIdentifier( "x-y'a", 'perl6' ) )226 ok_( iu.IsIdentifier( "x-_" , 'perl6' ) )227 ok_( iu.IsIdentifier( "x-_7" , 'perl6' ) )228 ok_( iu.IsIdentifier( "_x" , 'perl6' ) )229 ok_( iu.IsIdentifier( "x9" , 'perl6' ) )230 ok_( not iu.IsIdentifier( "'x" , 'perl6' ) )231 ok_( not iu.IsIdentifier( "x'" , 'perl6' ) )232 ok_( not iu.IsIdentifier( "-x" , 'perl6' ) )233 ok_( not iu.IsIdentifier( "x-" , 'perl6' ) )234 ok_( not iu.IsIdentifier( "x-1" , 'perl6' ) )235 ok_( not iu.IsIdentifier( "x--" , 'perl6' ) )236 ok_( not iu.IsIdentifier( "x--a", 'perl6' ) )237 ok_( not iu.IsIdentifier( "x-'" , 'perl6' ) )238 ok_( not iu.IsIdentifier( "x-'a", 'perl6' ) )239 ok_( not iu.IsIdentifier( "x-a-", 'perl6' ) )240 ok_( not iu.IsIdentifier( "x+" , 'perl6' ) )241 ok_( not iu.IsIdentifier( "9x" , 'perl6' ) )242 ok_( not iu.IsIdentifier( "9" , 'perl6' ) )243 ok_( not iu.IsIdentifier( '' , 'perl6' ) )244def IsIdentifier_Scheme_test():245 ok_( iu.IsIdentifier( 'λ' , 'scheme' ) )246 ok_( iu.IsIdentifier( '_' , 'scheme' ) )247 ok_( iu.IsIdentifier( '+' , 'scheme' ) )248 ok_( iu.IsIdentifier( '-' , 'scheme' ) )249 ok_( iu.IsIdentifier( '...' , 'scheme' ) )250 ok_( iu.IsIdentifier( r'\x01;' , 'scheme' ) )251 ok_( iu.IsIdentifier( r'h\x65;lle', 'scheme' ) )252 ok_( iu.IsIdentifier( 'foo' , 'scheme' ) )253 ok_( iu.IsIdentifier( 'foo+-*/1-1', 'scheme' ) )254 ok_( iu.IsIdentifier( 'call/cc' , 'scheme' ) )255 ok_( not iu.IsIdentifier( '.' , 'scheme' ) )256 ok_( not iu.IsIdentifier( '..' , 'scheme' ) )257 ok_( not iu.IsIdentifier( '--' , 'scheme' ) )258 ok_( not iu.IsIdentifier( '++' , 'scheme' ) )259 ok_( not iu.IsIdentifier( '+1' , 'scheme' ) )260 ok_( not iu.IsIdentifier( '-1' , 'scheme' ) )261 ok_( not iu.IsIdentifier( '-abc' , 'scheme' ) )262 ok_( not iu.IsIdentifier( '-<abc' , 'scheme' ) )263 ok_( not iu.IsIdentifier( '@' , 'scheme' ) )264 ok_( not iu.IsIdentifier( '@a' , 'scheme' ) )265 ok_( not iu.IsIdentifier( '-@a' , 'scheme' ) )266 ok_( not iu.IsIdentifier( '-12a' , 'scheme' ) )267 ok_( not iu.IsIdentifier( '12a' , 'scheme' ) )268 ok_( not iu.IsIdentifier( '\\' , 'scheme' ) )269 ok_( not iu.IsIdentifier( r'\x' , 'scheme' ) )270 ok_( not iu.IsIdentifier( r'\x123' , 'scheme' ) )271 ok_( not iu.IsIdentifier( r'aa\x123;cc\x', 'scheme' ) )272def StartOfLongestIdentifierEndingAtIndex_Simple_test():273 eq_( 0, iu.StartOfLongestIdentifierEndingAtIndex( 'foo', 3 ) )274 eq_( 0, iu.StartOfLongestIdentifierEndingAtIndex( 'f12', 3 ) )275def StartOfLongestIdentifierEndingAtIndex_BadInput_test():276 eq_( 0, iu.StartOfLongestIdentifierEndingAtIndex( '', 0 ) )277 eq_( 1, iu.StartOfLongestIdentifierEndingAtIndex( '', 1 ) )278 eq_( 5, iu.StartOfLongestIdentifierEndingAtIndex( None, 5 ) )279 eq_( -1, iu.StartOfLongestIdentifierEndingAtIndex( 'foo', -1 ) )280 eq_( 10, iu.StartOfLongestIdentifierEndingAtIndex( 'foo', 10 ) )281def StartOfLongestIdentifierEndingAtIndex_Punctuation_test():282 eq_( 1, iu.StartOfLongestIdentifierEndingAtIndex( '(foo', 4 ) )283 eq_( 6, iu.StartOfLongestIdentifierEndingAtIndex( ' foo', 9 ) )284 eq_( 4, iu.StartOfLongestIdentifierEndingAtIndex( 'gar;foo', 7 ) )285 eq_( 2, iu.StartOfLongestIdentifierEndingAtIndex( '...', 2 ) )286def StartOfLongestIdentifierEndingAtIndex_PunctuationWithUnicode_test():287 eq_( 1, iu.StartOfLongestIdentifierEndingAtIndex( u'(fäö', 4 ) )288 eq_( 2, iu.StartOfLongestIdentifierEndingAtIndex( u' fäö', 5 ) )289# Not a test, but a test helper function290def LoopExpectLongestIdentifier( ident, expected, end_index ):291 eq_( expected, iu.StartOfLongestIdentifierEndingAtIndex( ident, end_index ) )292def StartOfLongestIdentifierEndingAtIndex_Entire_Simple_test():293 ident = 'foobar'294 for i in range( len( ident ) ):295 yield LoopExpectLongestIdentifier, ident, 0, i296def StartOfLongestIdentifierEndingAtIndex_Entire_AllBad_test():297 ident = '....'298 for i in range( len( ident ) ):299 yield LoopExpectLongestIdentifier, ident, i, i300def StartOfLongestIdentifierEndingAtIndex_Entire_FirstCharNotNumber_test():301 ident = 'f12341234'302 for i in range( len( ident ) ):303 yield LoopExpectLongestIdentifier, ident, 0, i304def StartOfLongestIdentifierEndingAtIndex_Entire_SubIdentifierValid_test():305 ident = 'f123f1234'306 for i in range( len( ident ) ):307 yield LoopExpectLongestIdentifier, ident, 0, i308def StartOfLongestIdentifierEndingAtIndex_Entire_Unicode_test():309 ident = u'fäöttccoö'310 for i in range( len( ident ) ):311 yield LoopExpectLongestIdentifier, ident, 0, i312# Not a test, but a test helper function313def LoopExpectIdentfierAtIndex( ident, index, expected ):314 eq_( expected, iu.IdentifierAtIndex( ident, index ) )315def IdentifierAtIndex_Entire_Simple_test():316 ident = u'foobar'317 for i in range( len( ident ) ):318 yield LoopExpectIdentfierAtIndex, ident, i, ident319def IdentifierAtIndex_Entire_Unicode_test():320 ident = u'fäöttccoö'321 for i in range( len( ident ) ):322 yield LoopExpectIdentfierAtIndex, ident, i, ident323def IdentifierAtIndex_BadInput_test():324 eq_( '', iu.IdentifierAtIndex( '', 0 ) )325 eq_( '', iu.IdentifierAtIndex( '', 5 ) )326 eq_( '', iu.IdentifierAtIndex( 'foo', 5 ) )327 eq_( 'foo', iu.IdentifierAtIndex( 'foo', -5 ) )328def IdentifierAtIndex_IndexPastIdent_test():329 eq_( '', iu.IdentifierAtIndex( 'foo ', 5 ) )330def IdentifierAtIndex_StopsAtNonIdentifier_test():331 eq_( 'foo', iu.IdentifierAtIndex( 'foo(goo)', 0 ) )332 eq_( 'goo', iu.IdentifierAtIndex( 'foo(goo)', 5 ) )333def IdentifierAtIndex_LooksAhead_Success_test():334 eq_( 'goo', iu.IdentifierAtIndex( 'foo(goo)', 3 ) )335 eq_( 'goo', iu.IdentifierAtIndex( ' goo', 0 ) )336def IdentifierAtIndex_LooksAhead_Failure_test():337 eq_( '', iu.IdentifierAtIndex( 'foo ()***()', 5 ) )338def IdentifierAtIndex_SingleCharIdent_test():339 eq_( 'f', iu.IdentifierAtIndex( ' f ', 1 ) )340def IdentifierAtIndex_Css_test():...
oid.pyi
Source:oid.pyi
1from cryptography.hazmat.primitives.hashes import HashAlgorithm2from cryptography.x509 import ObjectIdentifier3class ExtensionOID:4 SUBJECT_DIRECTORY_ATTRIBUTES: ObjectIdentifier = ...5 SUBJECT_KEY_IDENTIFIER: ObjectIdentifier = ...6 KEY_USAGE: ObjectIdentifier = ...7 SUBJECT_ALTERNATIVE_NAME: ObjectIdentifier = ...8 ISSUER_ALTERNATIVE_NAME: ObjectIdentifier = ...9 BASIC_CONSTRAINTS: ObjectIdentifier = ...10 NAME_CONSTRAINTS: ObjectIdentifier = ...11 CRL_DISTRIBUTION_POINTS: ObjectIdentifier = ...12 CERTIFICATE_POLICIES: ObjectIdentifier = ...13 POLICY_MAPPINGS: ObjectIdentifier = ...14 AUTHORITY_KEY_IDENTIFIER: ObjectIdentifier = ...15 POLICY_CONSTRAINTS: ObjectIdentifier = ...16 EXTENDED_KEY_USAGE: ObjectIdentifier = ...17 FRESHEST_CRL: ObjectIdentifier = ...18 INHIBIT_ANY_POLICY: ObjectIdentifier = ...19 ISSUING_DISTRIBUTION_POINT: ObjectIdentifier = ...20 AUTHORITY_INFORMATION_ACCESS: ObjectIdentifier = ...21 SUBJECT_INFORMATION_ACCESS: ObjectIdentifier = ...22 OCSP_NO_CHECK: ObjectIdentifier = ...23 TLS_FEATURE: ObjectIdentifier = ...24 CRL_NUMBER: ObjectIdentifier = ...25 DELTA_CRL_INDICATOR: ObjectIdentifier = ...26 PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS: ObjectIdentifier = ...27 PRECERT_POISON: ObjectIdentifier = ...28class OCSPExtensionOID:29 NONCE: ObjectIdentifier = ...30class CRLEntryExtensionOID:31 CERTIFICATE_ISSUER: ObjectIdentifier = ...32 CRL_REASON: ObjectIdentifier = ...33 INVALIDITY_DATE: ObjectIdentifier = ...34class NameOID:35 COMMON_NAME: ObjectIdentifier = ...36 COUNTRY_NAME: ObjectIdentifier = ...37 LOCALITY_NAME: ObjectIdentifier = ...38 STATE_OR_PROVINCE_NAME: ObjectIdentifier = ...39 STREET_ADDRESS: ObjectIdentifier = ...40 ORGANIZATION_NAME: ObjectIdentifier = ...41 ORGANIZATIONAL_UNIT_NAME: ObjectIdentifier = ...42 SERIAL_NUMBER: ObjectIdentifier = ...43 SURNAME: ObjectIdentifier = ...44 GIVEN_NAME: ObjectIdentifier = ...45 TITLE: ObjectIdentifier = ...46 GENERATION_QUALIFIER: ObjectIdentifier = ...47 X500_UNIQUE_IDENTIFIER: ObjectIdentifier = ...48 DN_QUALIFIER: ObjectIdentifier = ...49 PSEUDONYM: ObjectIdentifier = ...50 USER_ID: ObjectIdentifier = ...51 DOMAIN_COMPONENT: ObjectIdentifier = ...52 EMAIL_ADDRESS: ObjectIdentifier = ...53 JURISDICTION_COUNTRY_NAME: ObjectIdentifier = ...54 JURISDICTION_LOCALITY_NAME: ObjectIdentifier = ...55 JURISDICTION_STATE_OR_PROVINCE_NAME: ObjectIdentifier = ...56 BUSINESS_CATEGORY: ObjectIdentifier = ...57 POSTAL_ADDRESS: ObjectIdentifier = ...58 POSTAL_CODE: ObjectIdentifier = ...59class SignatureAlgorithmOID:60 RSA_WITH_MD5: ObjectIdentifier = ...61 RSA_WITH_SHA1: ObjectIdentifier = ...62 _RSA_WITH_SHA1: ObjectIdentifier = ...63 RSA_WITH_SHA224: ObjectIdentifier = ...64 RSA_WITH_SHA256: ObjectIdentifier = ...65 RSA_WITH_SHA384: ObjectIdentifier = ...66 RSA_WITH_SHA512: ObjectIdentifier = ...67 RSASSA_PSS: ObjectIdentifier = ...68 ECDSA_WITH_SHA1: ObjectIdentifier = ...69 ECDSA_WITH_SHA224: ObjectIdentifier = ...70 ECDSA_WITH_SHA256: ObjectIdentifier = ...71 ECDSA_WITH_SHA384: ObjectIdentifier = ...72 ECDSA_WITH_SHA512: ObjectIdentifier = ...73 DSA_WITH_SHA1: ObjectIdentifier = ...74 DSA_WITH_SHA224: ObjectIdentifier = ...75 DSA_WITH_SHA256: ObjectIdentifier = ...76 ED25519: ObjectIdentifier = ...77 ED448: ObjectIdentifier = ...78class ExtendedKeyUsageOID:79 SERVER_AUTH: ObjectIdentifier = ...80 CLIENT_AUTH: ObjectIdentifier = ...81 CODE_SIGNING: ObjectIdentifier = ...82 EMAIL_PROTECTION: ObjectIdentifier = ...83 TIME_STAMPING: ObjectIdentifier = ...84 OCSP_SIGNING: ObjectIdentifier = ...85 ANY_EXTENDED_KEY_USAGE: ObjectIdentifier = ...86class AuthorityInformationAccessOID:87 CA_ISSUERS: ObjectIdentifier = ...88 OCSP: ObjectIdentifier = ...89class CertificatePoliciesOID:90 CPS_QUALIFIER: ObjectIdentifier = ...91 CPS_USER_NOTICE: ObjectIdentifier = ...92 ANY_POLICY: ObjectIdentifier = ...93_OID_NAMES: dict[ObjectIdentifier, str]...
identifiers.d.ts
Source:identifiers.d.ts
1import { CompileIdentifierMetadata, CompileTokenMetadata } from './compile_metadata';2export interface IdentifierSpec {3 name: string;4 moduleUrl: string;5 runtime: any;6}7export declare class Identifiers {8 static ANALYZE_FOR_ENTRY_COMPONENTS: IdentifierSpec;9 static ViewUtils: IdentifierSpec;10 static AppView: IdentifierSpec;11 static DebugAppView: IdentifierSpec;12 static ViewContainer: IdentifierSpec;13 static ElementRef: IdentifierSpec;14 static ViewContainerRef: IdentifierSpec;15 static ChangeDetectorRef: IdentifierSpec;16 static RenderComponentType: IdentifierSpec;17 static QueryList: IdentifierSpec;18 static TemplateRef: IdentifierSpec;19 static TemplateRef_: IdentifierSpec;20 static CodegenComponentFactoryResolver: IdentifierSpec;21 static ComponentFactoryResolver: IdentifierSpec;22 static ComponentFactory: IdentifierSpec;23 static ComponentRef_: IdentifierSpec;24 static ComponentRef: IdentifierSpec;25 static NgModuleFactory: IdentifierSpec;26 static NgModuleInjector: IdentifierSpec;27 static RegisterModuleFactoryFn: IdentifierSpec;28 static ValueUnwrapper: IdentifierSpec;29 static Injector: IdentifierSpec;30 static ViewEncapsulation: IdentifierSpec;31 static ViewType: IdentifierSpec;32 static ChangeDetectionStrategy: IdentifierSpec;33 static StaticNodeDebugInfo: IdentifierSpec;34 static DebugContext: IdentifierSpec;35 static Renderer: IdentifierSpec;36 static SimpleChange: IdentifierSpec;37 static UNINITIALIZED: IdentifierSpec;38 static ChangeDetectorStatus: IdentifierSpec;39 static checkBinding: IdentifierSpec;40 static devModeEqual: IdentifierSpec;41 static inlineInterpolate: IdentifierSpec;42 static interpolate: IdentifierSpec;43 static castByValue: IdentifierSpec;44 static EMPTY_ARRAY: IdentifierSpec;45 static EMPTY_MAP: IdentifierSpec;46 static createRenderElement: IdentifierSpec;47 static selectOrCreateRenderHostElement: IdentifierSpec;48 static pureProxies: IdentifierSpec[];49 static SecurityContext: IdentifierSpec;50 static AnimationKeyframe: IdentifierSpec;51 static AnimationStyles: IdentifierSpec;52 static NoOpAnimationPlayer: IdentifierSpec;53 static AnimationGroupPlayer: IdentifierSpec;54 static AnimationSequencePlayer: IdentifierSpec;55 static prepareFinalAnimationStyles: IdentifierSpec;56 static balanceAnimationKeyframes: IdentifierSpec;57 static clearStyles: IdentifierSpec;58 static renderStyles: IdentifierSpec;59 static collectAndResolveStyles: IdentifierSpec;60 static LOCALE_ID: IdentifierSpec;61 static TRANSLATIONS_FORMAT: IdentifierSpec;62 static setBindingDebugInfo: IdentifierSpec;63 static setBindingDebugInfoForChanges: IdentifierSpec;64 static AnimationTransition: IdentifierSpec;65 static InlineArray: IdentifierSpec;66 static inlineArrays: IdentifierSpec[];67 static EMPTY_INLINE_ARRAY: IdentifierSpec;68 static InlineArrayDynamic: IdentifierSpec;69 static subscribeToRenderElement: IdentifierSpec;70 static createRenderComponentType: IdentifierSpec;71 static noop: IdentifierSpec;72}73export declare function assetUrl(pkg: string, path?: string, type?: string): string;74export declare function resolveIdentifier(identifier: IdentifierSpec): any;75export declare function createIdentifier(identifier: IdentifierSpec): CompileIdentifierMetadata;76export declare function identifierToken(identifier: CompileIdentifierMetadata): CompileTokenMetadata;77export declare function createIdentifierToken(identifier: IdentifierSpec): CompileTokenMetadata;...
Using AI Code Generation
1const wptools = require('wptools');2const fs = require('fs');3const path = require('path');4const async = require('async');5const request = require('request');6const cheerio = require('cheerio');7const _ = require('lodash');8const data = require('./data.json');9const data2 = require('./data2.json');10const data3 = require('./data3.json');11const data4 = require('./data4.json');12const data5 = require('./data5.json');13const data6 = require('./data6.json');14const data7 = require('./data7.json');15const data8 = require('./data8.json');16const data9 = require('./data9.json');17const data10 = require('./data10.json');18const data11 = require('./data11.json');19const data12 = require('./data12.json');20const data13 = require('./data13.json');21const data14 = require('./data14.json');22const data15 = require('./data15.json');23const data16 = require('./data16.json');24const data17 = require('./data17.json');25const data18 = require('./data18.json');26const data19 = require('./data19.json');27const data20 = require('./data20.json');28const data21 = require('./data21.json');29const data22 = require('./data22.json');30const data23 = require('./data23.json');31const data24 = require('./data24.json');32const data25 = require('./data25.json');33const data26 = require('./data26.json');34const data27 = require('./data27.json');35const data28 = require('./data28.json');36const data29 = require('./data29.json');37const data30 = require('./data30.json');38const data31 = require('./data31.json');39const data32 = require('./data32.json');40const data33 = require('./data33.json');41const data34 = require('./data34.json');42const data35 = require('./data35.json');43const data36 = require('./data36.json');44const data37 = require('./data37.json');45const data38 = require('./data38.json');46const data39 = require('./data39.json');47const data40 = require('./data40.json');48const data41 = require('./data41.json');49const data42 = require('./data42.json');50const data43 = require('./data43.json');51const data44 = require('./data44.json');
Using AI Code Generation
1var wpt = require('webpagetest');2var test = wpt('www.webpagetest.org');3var location = 'Dulles:Chrome';4var options = {5};6test.runTest(url, options, function(err, data) {7 if (err) return console.error(err);8 console.log(data);9 test.getTestResults(data.data.testId, function(err, data) {10 if (err) return console.error(err);11 console.log(data);12 });13});14var wpt = require('webpagetest');15var test = wpt('www.webpagetest.org');16var location = 'Dulles:Chrome';17var options = {18};19test.runTest(url, options, function(err, data) {20 if (err) return console.error(err);21 console.log(data);22 test.getTestResults(data.data.testId, function(err, data) {23 if (err) return console.error(err);24 console.log(data);25 });26});27var wpt = require('webpagetest');28var test = wpt('www.webpagetest.org');29var location = 'Dulles:Chrome';30var options = {31};32test.runTest(url, options, function(err, data) {33 if (err) return console.error(err);34 console.log(data);35 test.getTestResults(data.data.testId, function(err, data) {36 if (err) return console.error(err);37 console.log(data);38 });39});40var wpt = require('webpagetest');41var test = wpt('www.webpagetest.org');42var location = 'Dulles:Chrome';43var options = {44};45test.runTest(url, options, function(err, data) {46 if (err) return console.error(err);47 console.log(data);
Using AI Code Generation
1const wpt = require('webpagetest');2const options = require('./options');3const url = require('url');4const fs = require('fs');5const path = require('path');6const request = require('request');7const wptClient = wpt(options.wpt);8function getWptResult(testId, callback) {9 wptClient.getTestResults(testId, (err, data) => {10 if (err) {11 console.log(err);12 } else {13 callback(data);14 }15 });16}17function getWptResultWithUrl(testId, callback) {18 wptClient.getTestResults(testId, (err, data) => {19 if (err) {20 console.log(err);21 } else {22 callback(data);23 }24 });25}26function getWptResultWithUrlAndIdentifier(testId, callback) {27 wptClient.getTestResults(testId, (err, data) => {28 if (err) {29 console.log(err);30 } else {31 callback(data);32 }33 });34}35function getWptResultWithUrlAndIdentifierAndLocation(testId, callback) {36 wptClient.getTestResults(testId, (err, data) => {37 if (err) {38 console.log(err);39 } else {40 callback(data);41 }42 });43}44function getWptResultWithUrlAndIdentifierAndLocationAndConnectivity(testId, callback) {45 wptClient.getTestResults(testId, (err, data) => {46 if (err) {47 console.log(err);48 } else {49 callback(data);50 }51 });52}53function getWptResultWithUrlAndIdentifierAndLocationAndConnectivityAndBrowser(testId, callback) {54 wptClient.getTestResults(testId, (err,
Using AI Code Generation
1var wpt = require('wpt.js');2var options = {3};4wpt.runTest(options, function(err, data) {5 if (err) {6 console.log(err);7 } else {8 wpt.getTestResults(data.data.testId, function(err, data) {9 if (err) {10 console.log(err);11 } else {12 console.log(data);13 }14 });15 }16});17## getLocations(callback)18var wpt = require('wpt.js');19wpt.getLocations(function(err, data) {20 if (err) {21 console.log(err);22 } else {23 console.log(data);24 }25});26## getTesters(callback)27var wpt = require('wpt.js');28wpt.getTesters(function(err, data) {29 if (err) {30 console.log(err);31 } else {32 console.log(data);33 }34});35## getTestResults(testId, callback)
Using AI Code Generation
1var WebPageTest = require('webpagetest');2var wpt = new WebPageTest('www.webpagetest.org', 'A.4d4f4b7f9b9a5b0e5d5a5e5c5c5e5d5f5');3}, function(err, data) {4 if (err) {5 return console.error(err);6 }7 console.log('Test submitted. View results at: %s', data.data.userUrl);8 wpt.getTestStatus(data.data.testId, function(err, data) {9 if (err) {10 return console.error(err);11 }12 console.log('Test status: %s', data.data.statusText);13 });14});
Using AI Code Generation
1var wpt = require('webpagetest');2var options = {3};4var webpagetest = new wpt(options);5 if (err) return console.error(err);6 console.log('Test submitted. Polling for results...');7 webpagetest.getTestStatus(data.data.testId, function(err, data) {8 if (err) return console.error(err);9 console.log('Poll complete. Results for ' + data.data.testUrl + ':');10 console.log(data.data);11 });12});
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!