Skip to content

Commit 3fa0684

Browse files
committed
feat: add tests for new .mjs and .cjs file extensions
1 parent 9f75d2b commit 3fa0684

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed

testdata/expected/file.cjs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
function dummy() {
18+
console.log('hello world!');
19+
}
20+
21+
module.exports = dummy
22+

testdata/expected/file.mjs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright 2018 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
function dummy() {
18+
console.log('hello world!');
19+
}
20+
21+
export default dummy
22+

testdata/initial/file.cjs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function dummy() {
2+
console.log('hello world!');
3+
}
4+
5+
module.exports = dummy
6+

testdata/initial/file.mjs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function dummy() {
2+
console.log('hello world!');
3+
}
4+
5+
export default dummy
6+

0 commit comments

Comments
 (0)