fix api module id relative tests
This commit is contained in:
parent
bbab5f72ec
commit
1acc71aa4e
@ -219,7 +219,7 @@ suite("api", function () {
|
|||||||
|
|
||||||
function getModuleNameTest(moduleFormat, expected) {
|
function getModuleNameTest(moduleFormat, expected) {
|
||||||
var result = transform("foo('bar');", {
|
var result = transform("foo('bar');", {
|
||||||
filename: "foo/bar/index",
|
filename: "/foo/bar/index",
|
||||||
modules: moduleFormat,
|
modules: moduleFormat,
|
||||||
moduleIds: true,
|
moduleIds: true,
|
||||||
getModuleId: function (name) {
|
getModuleId: function (name) {
|
||||||
@ -232,7 +232,7 @@ suite("api", function () {
|
|||||||
|
|
||||||
test("amd", function () {
|
test("amd", function () {
|
||||||
var expected = [
|
var expected = [
|
||||||
"define('foo/bar', ['exports'], function (exports) {",
|
"define('/foo/bar', ['exports'], function (exports) {",
|
||||||
" 'use strict';",
|
" 'use strict';",
|
||||||
"",
|
"",
|
||||||
" foo('bar');",
|
" foo('bar');",
|
||||||
@ -246,7 +246,7 @@ suite("api", function () {
|
|||||||
var expected = [
|
var expected = [
|
||||||
"(function (global, factory) {",
|
"(function (global, factory) {",
|
||||||
" if (typeof define === 'function' && define.amd) {",
|
" if (typeof define === 'function' && define.amd) {",
|
||||||
" define('foo/bar', ['exports'], factory);",
|
" define('/foo/bar', ['exports'], factory);",
|
||||||
" } else if (typeof exports !== 'undefined') {",
|
" } else if (typeof exports !== 'undefined') {",
|
||||||
" factory(exports);",
|
" factory(exports);",
|
||||||
" } else {",
|
" } else {",
|
||||||
@ -268,7 +268,7 @@ suite("api", function () {
|
|||||||
|
|
||||||
test("system", function () {
|
test("system", function () {
|
||||||
var expected = [
|
var expected = [
|
||||||
"System.register('foo/bar', [], function (_export) {",
|
"System.register('/foo/bar', [], function (_export) {",
|
||||||
" 'use strict';",
|
" 'use strict';",
|
||||||
"",
|
"",
|
||||||
" return {",
|
" return {",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user