def run_file(self, filename: str, expected) -> None: """Run a javascript file. Args: filename: The javascript filename, relative to qutebrowser/javascript. expected: The value expected return from the javascript execution """ source = utils.read_file(os.path.join('javascript', filename)) self.run(source, expected)
def run_file(self, filename): """Run a javascript file. Args: filename: The javascript filename, relative to qutebrowser/javascript. Return: The javascript return value. """ source = utils.read_file(os.path.join('javascript', filename)) return self.run(source)