amd.spec1.ts 422 字节
Newer Older
fxy060608's avatar
fxy060608 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
import {
  def,
  req,
  Exports,
  Require,
} from '../../src/service/framework/amd/index'
describe('amd', () => {
  test('basic', () => {
    def(
      'app-service',
      [],
      function (require: Require, exports: Exports, vue: Exports) {
        console.log(require, exports, vue)
      }
    )
    req(['app-service'], (AppService: Exports) => {
      console.log('app-service.init', AppService)
    })
  })
})