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

Can't import files from an outside relative path? #213

Open
alvarotrigo opened this issue Jun 12, 2019 · 1 comment
Open

Can't import files from an outside relative path? #213

alvarotrigo opened this issue Jun 12, 2019 · 1 comment

Comments

@alvarotrigo
Copy link

When importing files in my index.html that are relative to a folder outside theindex.html one, the test seems to fail as it seems it is not importing those files.
I start getting messages like "X is not defined", "X is not a constructor" etc.

Expected Behavior

Using relative paths pointing to files outside the main folder should work.

Actual Behavior

Using relative paths pointing to files outside the main folder doesn't work.

Steps to Reproduce the Problem

<!DOCTYPE html>
<html>
    <head>
        <link rel="stylesheet" href="./nada/qunit-1.18.0.css">
        <script type="text/javascript" src="../src/demo.js"></script>
    </head>
    <body>
        <div id="qunit"></div>
        <div id="qunit-fixture"></div>

        <script src="./nada/qunit-2.5.1.js"></script>
        <script type="text/javascript">
            QUnit.test("isEven returns true for even numbers", function(assert){
                assert.ok(isEven(10), "10 is even");
            });
        </script>
    </body>
</html>

Showing the following error:

isEven is not defined

Which won't show when changing the demo.js file path from ../src/ to ./ or any subfolder within the same folder.

<script type="text/javascript" src="../test/demo.js"></script>

browserstack.json

{
    "test_framework" : "qunit",
    "test_path": "pepe.html",
    "browsers": [
        "firefox_previous"
    ]
}

Platform details

  1. browserstack-runner version: latest
  2. node version: v10.13.0
  3. os type and version: Mac OS X 10.14.3

Details

@yuvrajgohil24
Copy link

Hey @alvarotrigo
I am facing an issue while setup the browserstack-runner rep. locally
After writing the browserstack-runner an error occurs which says "browserstack.json is missing"
browser-stack

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

2 participants