@@ -244,6 +244,7 @@ describe('v8debugapi', () => {
244244 const config : ResolvedDebugAgentConfig = extend ( { } , defaultConfig , {
245245 workingDirectory : __dirname ,
246246 forceNewAgent_ : true ,
247+ javascriptFileExtensions : [ '.js' , '.jsz' ] ,
247248 } ) ;
248249 const logger = consoleLogLevel ( {
249250 level : Debuglet . logLevelToName ( config . logLevel ) ,
@@ -253,10 +254,10 @@ describe('v8debugapi', () => {
253254 beforeEach ( done => {
254255 if ( ! api ) {
255256 scanner
256- . scan ( config . workingDirectory , / .j s $ | .j s .m a p $ / )
257+ . scan ( config . workingDirectory , / .j s $ | .j s z $ | . j s .m a p $ / )
257258 . then ( async fileStats => {
258259 assert . strictEqual ( fileStats . errors ( ) . size , 0 ) ;
259- const jsStats = fileStats . selectStats ( / .j s $ / ) ;
260+ const jsStats = fileStats . selectStats ( / .j s $ | . j s z $ / ) ;
260261 const mapFiles = fileStats . selectFiles ( / .j s .m a p $ / , process . cwd ( ) ) ;
261262 const mapper = await SourceMapper . create ( mapFiles ) ;
262263
@@ -322,6 +323,21 @@ describe('v8debugapi', () => {
322323 } ) ;
323324 } ) ;
324325
326+ it ( 'should permit breakpoints on js files with non-standard extensions' , done => {
327+ require ( './fixtures/hello.jsz' ) ;
328+ const bp : stackdriver . Breakpoint = ( {
329+ id : 0 ,
330+ location : { line : 1 , path : path . join ( 'fixtures' , 'hello.jsz' ) } ,
331+ } as { } ) as stackdriver . Breakpoint ;
332+ api . set ( bp , err1 => {
333+ assert . ifError ( err1 ) ;
334+ api . clear ( bp , err2 => {
335+ assert . ifError ( err2 ) ;
336+ done ( ) ;
337+ } ) ;
338+ } ) ;
339+ } ) ;
340+
325341 it ( 'should set error for breakpoint in non-js files' , done => {
326342 require ( './fixtures/key-bad.json' ) ;
327343 // TODO(dominickramer): Have this actually implement Breakpoint
0 commit comments