Skip to content

Commit

Permalink
* [jsfm] fixed all unit test for new file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinjiang committed Sep 22, 2016
1 parent ba7a40b commit d4eb5c9
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 46 deletions.
6 changes: 3 additions & 3 deletions html5/test/case/test.js
Expand Up @@ -34,12 +34,12 @@ import {
// env

import '../../shared'
import { Document, Element, Comment } from '../../vdom'
import Listener from '../../vdom/listener'
import { Document, Element, Comment } from '../../runtime/vdom'
import Listener from '../../runtime/listener'

// framework

import * as defaultFramework from '../../default'
import * as defaultFramework from '../../frameworks/legacy'
import { subversion } from '../../../package.json'

let callNativeHandler = function () {}
Expand Down
6 changes: 3 additions & 3 deletions html5/test/unit/default/api/methods.js
Expand Up @@ -5,9 +5,9 @@ const { expect } = chai
chai.use(sinonChai)

import '../../../../shared/console'
import * as modules from '../../../../default/api/modules'
import * as methods from '../../../../default/api/methods'
import { initModules, requireModule, clearModules, initMethods } from '../../../../default/app/register'
import * as modules from '../../../../frameworks/legacy/api/modules'
import * as methods from '../../../../frameworks/legacy/api/methods'
import { initModules, requireModule, clearModules, initMethods } from '../../../../frameworks/legacy/app/register'

function Vm () {
}
Expand Down
4 changes: 2 additions & 2 deletions html5/test/unit/default/api/modules.js
@@ -1,8 +1,8 @@
import chai from 'chai'
const { expect } = chai

import * as modules from '../../../../default/api/modules'
import { initModules, requireModule, clearModules } from '../../../../default/app/register'
import * as modules from '../../../../frameworks/legacy/api/modules'
import { initModules, requireModule, clearModules } from '../../../../frameworks/legacy/app/register'

describe('built-in modules', () => {
before(() => {
Expand Down
10 changes: 5 additions & 5 deletions html5/test/unit/default/app/bundle.js
Expand Up @@ -6,11 +6,11 @@ chai.use(sinonChai)

global.callNative = function () {}

import * as bundle from '../../../../default/app/bundle'
import * as register from '../../../../default/app/register'
import { removeWeexPrefix } from '../../../../default/util'
import { Document } from '../../../../vdom'
import Listener from '../../../../vdom/listener'
import * as bundle from '../../../../frameworks/legacy/app/bundle'
import * as register from '../../../../frameworks/legacy/app/register'
import { removeWeexPrefix } from '../../../../frameworks/legacy/util'
import { Document } from '../../../../runtime/vdom'
import Listener from '../../../../runtime/listener'

describe('parsing a bundle file', () => {
const componentTemplate = {
Expand Down
8 changes: 4 additions & 4 deletions html5/test/unit/default/app/ctrl.js
Expand Up @@ -6,10 +6,10 @@ chai.use(sinonChai)

global.callNative = function () {}

import * as ctrl from '../../../../default/app/ctrl'
import Differ from '../../../../default/app/differ'
import { Document } from '../../../../vdom'
import Listener from '../../../../vdom/listener'
import * as ctrl from '../../../../frameworks/legacy/app/ctrl'
import Differ from '../../../../frameworks/legacy/app/differ'
import { Document } from '../../../../runtime/vdom'
import Listener from '../../../../runtime/listener'

describe('the api of app', () => {
let app
Expand Down
2 changes: 1 addition & 1 deletion html5/test/unit/default/app/downgrade.js
@@ -1,7 +1,7 @@
import chai from 'chai'
const { expect } = chai

import * as Downgrade from '../../../../default/app/downgrade'
import * as Downgrade from '../../../../frameworks/legacy/app/downgrade'

describe('downgrade', () => {
describe('normalizeVersion', () => {
Expand Down
4 changes: 2 additions & 2 deletions html5/test/unit/default/app/index.js
Expand Up @@ -6,8 +6,8 @@ chai.use(sinonChai)

global.callNative = function () {}

import App from '../../../../default/app'
import { Element } from '../../../../vdom'
import App from '../../../../frameworks/legacy/app'
import { Element } from '../../../../runtime/vdom'

describe('App Instance', () => {
const oriCallNative = global.callNative
Expand Down
2 changes: 1 addition & 1 deletion html5/test/unit/default/app/register.js
Expand Up @@ -12,7 +12,7 @@ import {
requireModule,
requireCustomComponent,
registerCustomComponent
} from '../../../../default/app/register'
} from '../../../../frameworks/legacy/app/register'

function Ctx () {
this.customComponentMap = {}
Expand Down
8 changes: 4 additions & 4 deletions html5/test/unit/default/runtime.js
Expand Up @@ -7,12 +7,12 @@ const {
chai.use(sinonChai)

import { init, config } from '../../../runtime'
import frameworks from '../../../config'
import defaultConfig from '../../../default/config'
import frameworks from '../../../frameworks'
import defaultConfig from '../../../frameworks/legacy/config'
config.frameworks = frameworks

import Vm from '../../../default/vm'
import { clearModules, getModule } from '../../../default/app/register'
import Vm from '../../../frameworks/legacy/vm'
import { clearModules, getModule } from '../../../frameworks/legacy/app/register'

const framework = init(config)

Expand Down
2 changes: 1 addition & 1 deletion html5/test/unit/default/util/index.js
@@ -1,7 +1,7 @@
import chai from 'chai'
const { expect } = chai

import * as util from '../../../../default/util'
import * as util from '../../../../frameworks/legacy/util'

describe('Util', () => {
describe('isReserved', () => {
Expand Down
6 changes: 3 additions & 3 deletions html5/test/unit/default/vm/compiler.js
Expand Up @@ -4,9 +4,9 @@ import sinonChai from 'sinon-chai'
const { expect } = chai
chai.use(sinonChai)

import * as compiler from '../../../../default/vm/compiler'
import * as directive from '../../../../default/vm/directive'
import { initState } from '../../../../default/core/state'
import * as compiler from '../../../../frameworks/legacy/vm/compiler'
import * as directive from '../../../../frameworks/legacy/vm/directive'
import { initState } from '../../../../frameworks/legacy/core/state'

describe.skip('generate workflow', () => {
let contentIndex = 0
Expand Down
6 changes: 3 additions & 3 deletions html5/test/unit/default/vm/directive.js
Expand Up @@ -8,12 +8,12 @@ import {
applyNaitveComponentOptions,
bindSubVm,
bindSubVmAfterInitialized
} from '../../../../default/vm/directive'
} from '../../../../frameworks/legacy/vm/directive'

import {
initState
} from '../../../../default/core/state'
import config from '../../../../default/config'
} from '../../../../frameworks/legacy/core/state'
import config from '../../../../frameworks/legacy/config'

const { nativeComponentMap } = config
const directive = {}
Expand Down
6 changes: 3 additions & 3 deletions html5/test/unit/default/vm/dom-helper.js
Expand Up @@ -10,9 +10,9 @@ import {
attachTarget,
moveTarget,
removeTarget
} from '../../../../default/vm/dom-helper'
import { Document } from '../../../../vdom'
import Listener from '../../../../vdom/listener'
} from '../../../../frameworks/legacy/vm/dom-helper'
import { Document } from '../../../../runtime/vdom'
import Listener from '../../../../runtime/listener'

describe('help create body', () => {
let vm
Expand Down
6 changes: 3 additions & 3 deletions html5/test/unit/default/vm/events.js
Expand Up @@ -6,9 +6,9 @@ chai.use(sinonChai)

global.callNative = function () {}

import Vm from '../../../../default/vm'
import { Document } from '../../../../vdom'
import Listener from '../../../../vdom/listener'
import Vm from '../../../../frameworks/legacy/vm'
import { Document } from '../../../../runtime/vdom'
import Listener from '../../../../runtime/listener'

describe('bind and fire events', () => {
let doc, customComponentMap, spy
Expand Down
8 changes: 4 additions & 4 deletions html5/test/unit/default/vm/vm.js
Expand Up @@ -6,10 +6,10 @@ chai.use(sinonChai)

global.callNative = function () {}

import Vm from '../../../../default/vm'
import { Document } from '../../../../vdom'
import Listener from '../../../../vdom/listener'
import Differ from '../../../../default/app/differ'
import Vm from '../../../../frameworks/legacy/vm'
import { Document } from '../../../../runtime/vdom'
import Listener from '../../../../runtime/listener'
import Differ from '../../../../frameworks/legacy/app/differ'

describe('generate virtual dom for a single vm', () => {
const spy = sinon.spy()
Expand Down
4 changes: 2 additions & 2 deletions html5/test/unit/vdom/index.js
Expand Up @@ -9,9 +9,9 @@ import {
Document,
Element,
Comment
} from '../../../vdom'
} from '../../../runtime/vdom'

import Listener from '../../../vdom/listener'
import Listener from '../../../runtime/listener'

global.callNative = function () {}

Expand Down
4 changes: 2 additions & 2 deletions html5/test/unit/vdom/listener.js
Expand Up @@ -6,8 +6,8 @@ chai.use(sinonChai)

global.callNative = function () {}

import { Document } from '../../../vdom'
import Listener from '../../../vdom/listener'
import { Document } from '../../../runtime/vdom'
import Listener from '../../../runtime/listener'

global.callNative = function () {}

Expand Down

0 comments on commit d4eb5c9

Please sign in to comment.