You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
3 months ago
|
import Vue from 'vue'
|
||
|
import BaiduMap from '../components/index.js'
|
||
|
import {expect} from 'chai'
|
||
|
import {createApp} from './util/util.js'
|
||
|
|
||
|
describe('Regist', () => {
|
||
|
it('global regist', done => {
|
||
|
Vue.use(BaiduMap, {ak: 'oW2UEhdth2tRbEE4FUpF9E5YVDCIPYih'})
|
||
|
const app = createApp({})
|
||
|
expect(app._BMap().ak).equal('oW2UEhdth2tRbEE4FUpF9E5YVDCIPYih')
|
||
|
done()
|
||
|
})
|
||
|
})
|
||
|
|
||
|
// describe('Map', () => {
|
||
|
// it('load map component', done => createApp({
|
||
|
// template: `<baidu-map @ready="test"></baidu-map>`,
|
||
|
// methods: {
|
||
|
// test ({BMap, map}) {
|
||
|
// expect(map.loaded).equal(true)
|
||
|
// expect(BMap).equal(global.BMap)
|
||
|
// done()
|
||
|
// }
|
||
|
// }
|
||
|
// })).timeout(5000)
|
||
|
|
||
|
// it('load map component with ak', done => createApp({
|
||
|
// template: `<baidu-map ak="oW2UEhdth2tRbEE4FUpF9E5YVDCIPYih" @ready="test"></baidu-map>`,
|
||
|
// methods: {
|
||
|
// test ({BMap, map}) {
|
||
|
// expect(map.loaded).equal(true)
|
||
|
// expect(BMap).equal(global.BMap)
|
||
|
// done()
|
||
|
// }
|
||
|
// }
|
||
|
// })).timeout(5000)
|
||
|
// })
|