1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ // I don't like that these two files (this plus ".test") are duplicated
16+ // across the two test structures, but because of the tangle of rootDirs
17+ // and package.json "files", it's hard to avoid it.
18+
1519import * as uuid from 'uuid' ;
1620
1721// Returns a shortened UUID that can be used to identify a
@@ -76,7 +80,7 @@ export class TestResources {
7680 getPrefix ( testId ?: string ) : string {
7781 if ( testId ) {
7882 return [ this . testSuiteId , this . currentTime , normalizeId ( testId ) ] . join (
79- '-'
83+ '-' ,
8084 ) ;
8185 } else {
8286 return [ this . testSuiteId , this . currentTime ] . join ( '-' ) ;
@@ -97,7 +101,7 @@ export class TestResources {
97101 */
98102 generateBigQueryName ( testId : string ) : string {
99103 return [ normalizeId ( this . getPrefix ( testId ) ) , this . tokenMaker . uuid ( ) ] . join (
100- '_'
104+ '_' ,
101105 ) ;
102106 }
103107
@@ -107,45 +111,39 @@ export class TestResources {
107111 */
108112 generateStorageName ( testId : string ) : string {
109113 return [ normalizeId ( this . getPrefix ( testId ) ) , this . tokenMaker . uuid ( ) ] . join (
110- '_'
114+ '_' ,
111115 ) ;
112116 }
113117
114- /*!
118+ /**
115119 * Given a list of resource names (and a test ID), this will return
116120 * a list of all resources that should be deleted to clean up for
117121 * the current run of that particular test.
118- *
119- * Leaving this commented out for now since it's not actively needed.
120122 */
121- /* filterForTest(testId: string, allResources: Resource[]): Resource[] {
123+ filterForTest ( testId : string , allResources : Resource [ ] ) : Resource [ ] {
122124 const prefix = this . getPrefix ( testId ) ;
123125 return allResources . filter ( n => n . name ?. includes ( prefix ) ) ;
124- }*/
126+ }
125127
126- /*!
128+ /**
127129 * Given a list of resource names, this will return a list of all
128130 * resources that should be deleted to clean up after the current
129131 * run of a test suite.
130- *
131- * Leaving this commented out for now since it's not actively needed.
132132 */
133- /* filterForCurrentRun(allResources: Resource[]): Resource[] {
133+ filterForCurrentRun ( allResources : Resource [ ] ) : Resource [ ] {
134134 const prefix = this . getPrefix ( ) ;
135135 return allResources . filter ( n => n . name ?. includes ( prefix ) ) ;
136- }*/
136+ }
137137
138138 /**
139139 * Given a list of resource names, this will return a list of all
140140 * resources that should be deleted to clean up after any run
141141 * of the current test suite. Note that some of the names may
142142 * still be in use.
143- *
144- * Leaving this commented out for now since it's not actively needed.
145143 */
146- /* filterForSuite(allResources: Resource[]): Resource[] {
144+ filterForSuite ( allResources : Resource [ ] ) : Resource [ ] {
147145 return allResources . filter ( n => n . name ?. includes ( this . testSuiteId ) ) ;
148- }*/
146+ }
149147
150148 /**
151149 * Given a list of resource names, this will return a list of all
0 commit comments