mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Fix Date tests to always mock UTC
This commit is contained in:
4
otto.go
4
otto.go
@@ -263,6 +263,8 @@ func (otto *Otto) clone() *Otto {
|
||||
//
|
||||
// src may be a string, a byte slice, a bytes.Buffer, or an io.Reader, but it MUST always be in UTF-8.
|
||||
//
|
||||
// src may also be a Script.
|
||||
//
|
||||
// src may also be a node, but if the AST has been modified, then runtime behavior is undefined.
|
||||
//
|
||||
func Run(src interface{}) (*Otto, Value, error) {
|
||||
@@ -278,6 +280,8 @@ func Run(src interface{}) (*Otto, Value, error) {
|
||||
// If the runtime is unable to parse source, then this function will return undefined and the parse error (nothing
|
||||
// will be evaluated in this case).
|
||||
//
|
||||
// src may also be a Script.
|
||||
//
|
||||
// src may also be a node, but if the AST has been modified, then runtime behavior is undefined.
|
||||
//
|
||||
func (self Otto) Run(src interface{}) (Value, error) {
|
||||
|
||||
Reference in New Issue
Block a user