chore: move tests out of core and into the top level crate
This commit moves the tests out of core so rust analyzer is happier with the workspace.
This commit is contained in:
1 parent
e932ed202a
commit
e04a6d63a5
20 files changed
+27
-59
No files matched your search
+12
@@ -69,3 +69,15 @@ rand = { version = "0.8.4", features = ["small_rng"] }
|
||||
tokio = { version = "1.16.1", features = ["full"] }
|
||||
reqwest = { version = "0.11.9", features = ["json"] }
|
||||
dioxus = { path = ".", features = ["desktop", "ssr", "router", "fermi"] }
|
||||
fern = { version = "0.6.0", features = ["colored"] }
|
||||
criterion = "0.3.5"
|
||||
thiserror = "1.0.30"
|
||||
|
||||
|
||||
[[bench]]
|
||||
name = "create"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "jsframework"
|
||||
harness = false
|
||||
File renamed without changes.
File renamed without changes.
@@ -45,24 +45,8 @@ serde = { version = "1", features = ["derive"], optional = true }
|
||||
# todo: I want to get rid of this
|
||||
backtrace = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
anyhow = "1.0.42"
|
||||
fern = { version = "0.6.0", features = ["colored"] }
|
||||
rand = { version = "0.8.4", features = ["small_rng"] }
|
||||
dioxus-core-macro = { path = "../core-macro", version ="^0.1.6"}
|
||||
criterion = "0.3.5"
|
||||
thiserror = "1.0.30"
|
||||
dioxus-html = { path = "../html" }
|
||||
|
||||
[features]
|
||||
default = []
|
||||
serialize = ["serde"]
|
||||
debug_vdom = []
|
||||
|
||||
[[bench]]
|
||||
name = "create"
|
||||
harness = false
|
||||
|
||||
[[bench]]
|
||||
name = "jsframework"
|
||||
harness = false
|
||||
@@ -83,7 +83,7 @@ pub use crate::innerlude::{
|
||||
pub mod prelude {
|
||||
pub use crate::innerlude::{
|
||||
fc_to_builder, Attributes, Component, DioxusElement, Element, EventHandler, Fragment,
|
||||
LazyNodes, NodeFactory, Properties, Scope, ScopeState, VNode, VirtualDom,
|
||||
LazyNodes, NodeFactory, Properties, Scope, ScopeId, ScopeState, VNode, VirtualDom,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
dist/
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,9 +1,6 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
#[test]
|
||||
fn test_borrowed_state() {
|
||||
@@ -5,13 +5,10 @@
|
||||
//! This methods all use "rebuild" which completely bypasses the scheduler.
|
||||
//! Hard rebuilds don't consume any events from the event queue.
|
||||
|
||||
use dioxus::{prelude::*, DomEdit};
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
mod test_logging;
|
||||
use DomEdit::*;
|
||||
use dioxus_core::DomEdit::*;
|
||||
|
||||
fn new_dom<P: 'static + Send>(app: Component<P>, props: P) -> VirtualDom {
|
||||
const IS_LOGGING_ENABLED: bool = false;
|
||||
@@ -6,10 +6,7 @@
|
||||
//!
|
||||
//! It does not validated that component lifecycles work properly. This is done in another test file.
|
||||
|
||||
use dioxus::{prelude::*, DomEdit};
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
mod test_logging;
|
||||
|
||||
@@ -19,7 +16,7 @@ fn new_dom() -> VirtualDom {
|
||||
VirtualDom::new(|cx| rsx!(cx, "hi"))
|
||||
}
|
||||
|
||||
use DomEdit::*;
|
||||
use dioxus_core::DomEdit::*;
|
||||
|
||||
/// Should push the text node onto the stack and modify it
|
||||
#[test]
|
||||
@@ -5,13 +5,10 @@
|
||||
//! This methods all use "rebuild" which completely bypasses the scheduler.
|
||||
//! Hard rebuilds don't consume any events from the event queue.
|
||||
|
||||
use dioxus::{prelude::*, DomEdit, ScopeId};
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
mod test_logging;
|
||||
use DomEdit::*;
|
||||
use dioxus_core::{DomEdit::*, ScopeId};
|
||||
|
||||
const IS_LOGGING_ENABLED: bool = false;
|
||||
|
||||
@@ -3,12 +3,7 @@
|
||||
|
||||
//! Tests for the lifecycle of components.
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core::DomEdit::*;
|
||||
use dioxus_core::ScopeId;
|
||||
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
mod test_logging;
|
||||
@@ -10,10 +10,8 @@ Specifically:
|
||||
- [ ] Async isn't busted
|
||||
*/
|
||||
|
||||
use dioxus::{prelude::*, SchedulerMsg, ScopeId};
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core::SchedulerMsg;
|
||||
|
||||
mod test_logging;
|
||||
|
||||
@@ -7,10 +7,7 @@
|
||||
//!
|
||||
//! It does not validated that component lifecycles work properly. This is done in another test file.
|
||||
|
||||
use dioxus::{prelude::*, DomEdit, ScopeId};
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use dioxus::prelude::*;
|
||||
|
||||
mod test_logging;
|
||||
|
||||
@@ -20,7 +17,7 @@ fn new_dom() -> VirtualDom {
|
||||
VirtualDom::new(|cx| rsx!(cx, "hi"))
|
||||
}
|
||||
|
||||
use DomEdit::*;
|
||||
use dioxus_core::DomEdit::*;
|
||||
|
||||
/// Should push the text node onto the stack and modify it
|
||||
#[test]
|
||||
File renamed without changes.
@@ -1,10 +1,7 @@
|
||||
#![allow(unused, non_upper_case_globals, non_snake_case)]
|
||||
|
||||
use dioxus::{prelude::*, DomEdit, Mutations, SchedulerMsg, ScopeId};
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core::{DomEdit, Mutations, SchedulerMsg, ScopeId};
|
||||
use DomEdit::*;
|
||||
|
||||
mod test_logging;
|
||||
File renamed without changes.
File renamed without changes.
@@ -11,11 +11,7 @@
|
||||
//! Don't have a good way to validate, everything is done manually ATM
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use dioxus::DomEdit;
|
||||
use dioxus_core as dioxus;
|
||||
use dioxus_core_macro::*;
|
||||
use dioxus_html as dioxus_elements;
|
||||
use DomEdit::*;
|
||||
use dioxus_core::DomEdit::*;
|
||||
|
||||
#[test]
|
||||
fn app_runs() {
|
||||
Reference in new issue
Block a user