Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocha testing fail #14

Open
Co0olCat opened this issue Jul 28, 2020 · 0 comments
Open

Mocha testing fail #14

Co0olCat opened this issue Jul 28, 2020 · 0 comments

Comments

@Co0olCat
Copy link

Hi,

First of all, thank you - great job.

Issue: When testing with Mocha -> error:: TypeError: Cannot set property '0' of undefined

Proposed solution: In your vue component file using vue-xlsx add "import Xlsx from 'xlsx';"

This is snippet from my vue file:

...
<script>

    import {
        XlsxRead,
        XlsxJson,
        XlsxSheets
    } from 'vue-xlsx';

    import Xlsx from 'xlsx';

    export default {
        components: {
            XlsxRead,
            XlsxJson,
            XlsxSheets
        },
        data() {
            return {
                file: null,
                selectedSheet: null,
                selectedData: null
            };
        },
...

Thank you.

Issue is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant